bug记录

1>
-[DYMessageNewsTableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:]: row (37) beyond bounds (36) for section (0

  1. 解决方法:  
  2. 1.1在还没加载数据时就设置选中了,所以报错,应该加载完table以后再设置。。   
  3. 1.2如果数据源为0时,就不用滚动了,加入if判断

2>

 UILocalNotification *localNoti = [[UILocalNotification alloc] init];
 localNoti.alertTitle = @"通知";  

 这个本地通知在iOS8.2以下系统会崩溃,因为alertTitle是8.2才有的属性.这里只要判断一下系统版本就可以

3>

以后不能同时有两个一样的.m文件在编译,这样会报linker command failed with exit code 1 (use -vto see invocation)这个错误。

4>

今天想用pod升级下afn3.1,结果出错了(

The sandbox is not sync with the Podfile.lock'

),看了网上的一些方法,删除xcworkspace等等,但是都还是出现别的错误,后面发现有个是第三方的文件都找不到,但是pod中是有的,问题在这里

在projectde的configurations中set没有这个项目的包,添加上就解决了

5>

** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[3]

在初始化字典的时候有可能会插入空值,这样会造成崩溃,使用 setValue forKey:当有空值时不插入这个key.

我使用了category 重新字典里面的赋值方法.在value等于空时让value=nil

原文地址:https://www.cnblogs.com/ritian/p/6134272.html