attempt to insert nil object from objects
試圖從對象插入零對象

該錯誤出現(xiàn)的原因為對nil屬性進行了操作
原因如下:
self.tagList.selectedArray.count <= 0
self.tagList.selectedArray數(shù)據(jù)源為nil
對nil進行了.count運算
解決問題心得:
解決該問題先找出出錯的數(shù)組,該數(shù)組存在的含義,在哪兒用到,數(shù)組里面存放的什么東西。
debug調(diào)試是否為nil,為nil對數(shù)組做判斷
解決方法:
if(self.tagList.selectedArray && self.tagList.selectedArray.count <= 0 )
1. ?self.tagList.selectedArray先確定self.tagList.selectedArray不為nil
2. ?再對self.tagList.selectedArray進行.count操作