开发者

how to handle table index out of bound for iphone

开发者 https://www.devze.com 2023-01-09 11:34 出处:网络
when i scroll table view data then开发者_运维百科 i am getting this error ** Terminating app due to uncaught exception \'NSRangeException\', reason: \'*** -[NSCFArray objectAtIndex:]: index (5) beyon

when i scroll table view data then开发者_运维百科 i am getting this error

** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSCFArray objectAtIndex:]: index (5) beyond bounds (5)'
2010-07-31 12:24:50.297 Wat2Eat[3105:207] Stack: (

how to solve


Don't use an invalid index in your array. The error message is clearly stating that you have an array with 5 items and you are trying to access more than this - array indices are 0 based so the maximum is 4.

0

精彩评论

暂无评论...
验证码 换一张
取 消