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

*** 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 的地方仔细检查一遍,发现问题。



你可能感兴趣的:(ios,UI,数据,gdb,UITableView)