iOS - *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM ob

来源:互联网 发布:30而立40不惑50知天命 编辑:程序博客网 时间:2024/04/27 21:32

*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0]'*** First throw call stack:(0x3693b2a3 0x3443b97f 0x36886b75 0x18e391 0x36367275 0x363e9ea9 0x38a09a6f 0x369105df 0x36910291 0x3690ef01 0x36881ebd 0x36881d49 0x345372eb 0x362f9301 0x95d55 0x95c50)libc++abi.dylib: terminate called throwing an exception

在一个项目里,UI部分是UITableView,经常出现上述错误:


后来检查,发现是 indexPath.row  查找不到数据。把用过indexPath.row 的地方仔细检查一遍,发现问题。



0 0