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
因爲枚舉類型內部,使用分號隔開