// // Phone.h #import // 被继承的这个类我们称之为父类/ 超类 @interface Phone : NSObject { int _cpu; } // 打电话 - (void)signalWithNumber:(NSString *)number; // 发短信 - (vo... ...
分类:
其他好文 时间:
2017-08-22 19:45:14
阅读次数:
154
// // main.m // 类方法,不可以直接访问对象的属性和方法,类方法中可以直接调用类方法。 // NSString基本使用 #import //#import @interface Iphone : NSObject - (NSString *)loadMessage; @end @imp... ...
分类:
其他好文 时间:
2017-08-22 16:03:05
阅读次数:
108
#defineLAST_RUN_VERSION_KEY@"last_run_version_of_application"-(BOOL)isFirstLoad{NSString*currentVersion=[[[NSBundlemainBundle]infoDictionary]objectForKey:@"CFBundleShortVersionString"];NSUserDefaults*defaults=[NSUserDefaultsstandardUserDefaults];NSString*la..
分类:
移动开发 时间:
2017-08-22 00:29:05
阅读次数:
215
1.模型 @class FriendsModel; @interface GroupModel : NSObject @property (nonatomic, copy) NSString *name; @property (nonatomic, copy) NSString *online; @ ...
分类:
其他好文 时间:
2017-08-18 20:06:22
阅读次数:
157
@property (nonatomic,strong) NSArray *imageData;//定义一个数组 //懒加载数据 -(NSArray *)imageDate { if(_imageDate==nil) { NSBundle *bundle=[NSBundle mainBundle];... ...
分类:
移动开发 时间:
2017-08-18 19:51:03
阅读次数:
265
如果深入学习ios Runtime,不得不提到消息转发,很多框架的实现都基于这一功能实现(例如JSPatch) 虽然看了很多篇关于消息转发的文章,但是理解的不是很透彻,还是自己实践一些理解能更加透彻一下。 首先我自己定义了一个MyString继承NSString 然后创建一个MyString,通过p ...
分类:
移动开发 时间:
2017-08-18 12:42:07
阅读次数:
251
刚接触iOS,依照教程操作执行出现错误 Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier Ce ...
分类:
移动开发 时间:
2017-08-16 23:20:40
阅读次数:
292
上面代码放在自定义 draw方法里 或者 去掉GCD多线程,直接放到 drawRect方法里,重写它,因为drawRect本来就是异步绘制 ...
分类:
其他好文 时间:
2017-08-16 11:27:16
阅读次数:
699
1.CoreImage 中的模糊滤镜 1.1CoreImage是苹果用来简化图片处理的框架 1.2CIImage、CIFilter与CIContext三者联系 1.3CIGaussianBlur中可能设置的參数 2.UIImage+imageEffects的category模糊效果 3.iOS8中的 ...
分类:
其他好文 时间:
2017-08-15 21:08:33
阅读次数:
256
前言 今天我们来讨论一个经常出现的需求场景,也是一个老话题。在开发中我们往往会遇到需要进行多个网络请求,并且需要多个网络请求成功返回后再做其他事的场景。比如同一个界面显示的内容需要用到两个网络接口,而需求又希望成功返回两个接口的数据再进行页面展示;又比如喜欢挖坑的后台同学就只提供了返回一条数据的接口 ...
分类:
移动开发 时间:
2017-08-15 16:30:08
阅读次数:
246