摘要: instancetype在类型表示上,跟id一样,可以表示任何对象类型 instancetype只能用在返回值类型上,不能像id一样用在参数类型上 instancetype比id多一个好处:编译器会检测instancetype的真实类型 阅读全文
posted @ 2016-12-03 21:33 iFat 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 1.字典转模型的过程最好封装在模型内部 2.模型应该提供一个可以传入字典参数的构造方法 - (instancetype)initWithDict:(NSDictionary *)dict;+ (instancetype)xxxWithDict:(NSDictionary *)dict; 阅读全文
posted @ 2016-12-03 21:32 iFat 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 1.使用Objective-C开发iOS程序时,最好在每个类名前面加一个前缀,用来标识这个类的“老家”在哪 2.目的是防止N个人开发了一样的类,冲突了 比如Jake Will、Kate Room在同一个项目中都各自开发了个Button类,这样的程序是不能运行起来的 解决方案:Jake Will的类名 阅读全文
posted @ 2016-12-03 21:06 iFat 阅读(327) 评论(0) 推荐(0) 编辑
摘要: [1]透明 [2]旋转 [3]缩放 [4]位移 阅读全文
posted @ 2016-12-03 19:04 iFat 阅读(331) 评论(0) 推荐(0) 编辑