Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'

报错:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'

看起报错就知道:试图插入零对象。

说明某个对象为零或为空

解决方法:

检查一遍当页代码,是否有相关现象。一般为没有开辟空间的数组。直接被拿去使用了。

如:

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return datamutarr.count;

}
原文地址:https://www.cnblogs.com/OIMM/p/7609785.html