- attempt to insert nil object fro
- attempt to insert nil object fro
- NSUserDefaults crash问题相关
- iOS swift-NSUserDefaults 数据保存报错
- "Attempt to insert non-property
- Mac OS AppKit文档翻译——NSImageView
- `Attempt to mutate immutable obj
- 'str' object has no attribute 'i
- lua “attempt to index a nil valu
- NotificationCenter参数注意点
attempt to insert nil object from objects
试图从对象插入零对象

原因如下:
self.tagList.selectedArray.count <= 0
self.tagList.selectedArray数据源为nil
对nil进行了.count运算
解决问题心得:
解决该问题先找出出错的数组,该数组存在的含义,在哪儿用到,数组里面存放的什么东西。
debug调试是否为nil,为nil对数组做判断
解决方法:
if(self.tagList.selectedArray && self.tagList.selectedArray.count <= 0 )
1. self.tagList.selectedArray先确定self.tagList.selectedArray不为nil
2. 再对self.tagList.selectedArray进行.count操作
网友评论