1、express
2016-04-27 23:04:41数组
错误提示:网络
-[ZWEditViewController add:]: unrecognized selector sent to instance 0x7fa7fb87abb0 app
2、框架
2016-05-03 22:13:17加密
cell不显示数据多是没有给tableView添加数据源,也没有添加数据源代理,可是不会报错!!!url
3、spa
2016-05-04 10:31:35代理
不当心把代码写到code
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
}
4、
2016-05-10 11:24:51
NSData *data = [NSData dataWithContentsOfURL:url];下载图片数据的时候,控制台提示:
App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
由于在iOS9中,苹果将原http协议改为了https协议,使用 TLS1.2 SSL加密请求数据
须要修改info.plist
修改结果:
5、
2016-06-20 14:42:03
用UItableViewController的时候,注意必定要改控制器的Class,不然没法显示出数据,也不会报错!!!
6、
2016-07-06 22:52:06
2016-07-06 22:51:21.701 6.26百思不得姐(初始化设置)[1893:71630] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSInvocation setArgument:atIndex:]: index (2) out of bounds [-1, 1]'
- (IBAction)save {
UIImageWriteToSavedPhotosAlbum(self.imageView.image, self, @selector(saveSuccess), nil);
}
- (void)saveSuccess
{
[SVProgressHUD showSuccessWithStatus:@"保存成功"];
}
方法参数越界,即(红字出)须要接收两个参数传给方法。能够去底层查看,它有举例方法
7、
2016-07-09 19:04:44
-[__NSCFDictionary user]: unrecognized selector sent to instance 0x7f9275918110
因为在数组中装对象这个代码中的数组名写错:
+ (NSDictionary *)mj_objectClassInArray
{
return @{@"top_cmd" : [ZWComment class]}; //此处本应该是cmt,纯书写错误
}
8、2016-07-13 23:48:11
注意,在类方法中使用self后面的调用的方法的类型也必须是类方法,不然会报错,找不到方法
1 + (void)initialize 2 { 3 UITapGestureRecognizer *tap =[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(windowClick)]; 4 [window_ addGestureRecognizer:tap]; 5 } 6 //必须是类方法,不然会报错 7 + (void)windowClick 8 { 9 ZWLogFunc; 10 }
9、2016-07-23 08:49:24
push出来的控制器若是出现卡顿(控制器为空),直接设置push出来控制器的颜色就OK!
10、2016-07-23 13:51:39
MJExtension中有个一个info.plist,用框架的时候记得得先删除,不然会报错you don't have permission
11、2016-07-24 16:03:00
addObjectsFromArray与addObject的区别,第一个是把每一个元素添加进去,第二个是把元素总体添加进去,在下载网络数据的时候会在setter方法中设置属性值的地方报错!!
12、2016-08-19 09:26:59
expected constant-expression' or end of enumerator definition
因为枚举类型内部,使用分号隔开