摘要: 第一种解决方法:改成 performSelectorOnMainThread 调用刷新才成功。 第二种解决方法,就是放到 textFieldDidEndEditing 回调中处理 阅读全文
posted @ 2016-11-08 16:15 shuleihen 阅读(1015) 评论(0) 推荐(0) 编辑
摘要: 假设ViewController A 和 B 都被添加到navigationcontroller 栈中,顺序是A->B,A 页面隐藏导航条,B 页面显示导航条。 最简单实现是在 A 的 viewWillAppear 中隐藏navBar,在viewWillDisappear 中显示navBar,代码如 阅读全文
posted @ 2016-08-09 10:25 shuleihen 阅读(4178) 评论(0) 推荐(0) 编辑
摘要: 1、Certificates(证书) 证书是用来给应用程序签名的,只有经过签名的应用程序才能保证他的来源是可信任的,并且代码是完整,未修改的。在Xcode Build Setting的Code Siging Identity中,你可以设置用于代码签名的证书。 证书主要分两类:Development和 阅读全文
posted @ 2016-07-12 16:43 shuleihen 阅读(5781) 评论(1) 推荐(0) 编辑
摘要: 1、项目代码结构 如下为我的项目结构,使用的cocoapods 管理。 Metadata 存放model数据,Modules 存放功能模块 使用的第三方库 #source "https://github.com/CocoaPods/Specs"#source "https://github.com/ 阅读全文
posted @ 2016-07-12 16:13 shuleihen 阅读(1949) 评论(0) 推荐(0) 编辑
摘要: cocoa pods 网站: https://cocoapods.org/ 1、创建 pod 运行 pod lib create xxx,在运行当前目录创建名称为xxx 的项目,这个过程中会要求填写支持的语言oc or swift,是否创建Demo,选择测试框架等信息。 创建成功后修改 .podsp 阅读全文
posted @ 2016-05-30 09:31 shuleihen 阅读(427) 评论(0) 推荐(0) 编辑
摘要: 一、服务器端 1、在服务器上添加新用户和密码 sudo useradd -m git sudo passwd git 2、添加一个空的项目 mkdir example.git cdexample.git git --bare init git init -bare 和git... 阅读全文
posted @ 2015-10-24 16:37 shuleihen 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 1、TableView 样式@property (nonatomic, readonly) UITableViewStylestyle;平铺模式:sectionHeader和sectionFooter会悬停,有sectionIndex,分隔线分组模式:heightForHeaderInSection... 阅读全文
posted @ 2015-10-24 15:31 shuleihen 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 1、需要引入 libSystem.dylib2、添加NSData 类扩展,代码如下extension NSData{ func AES128Crypt(operation:CCOperation,keyData:NSData)->NSData?{ let keyBytes ... 阅读全文
posted @ 2015-07-29 16:42 shuleihen 阅读(2240) 评论(0) 推荐(0) 编辑
摘要: 1、插值userName为待插入值${userName} 插值2、处理不存在插值${userName!}或给定缺省值:${userName!'张三'}3、??询问变量是否存在,不存在返回false${userName}4、注释5、if 指令6、list 指令${user.name}${user_in... 阅读全文
posted @ 2015-05-27 20:55 shuleihen 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 变量(1)let 声明常量,var 声明变量,常量只能赋值一次。(2)常量和变量在声明的同时赋值,编译器会自动推断类型。(3)在声明时即不赋值也不指定类型,编译会出错,即不能声明类型不确定的变量。(4)swift的变量是强类型的,变量的类型确定以后,就不能在赋值其他类型数据给变量。(5)变量在声明的... 阅读全文
posted @ 2015-04-01 11:08 shuleihen 阅读(1045) 评论(0) 推荐(0) 编辑