how to handle table index out of bound for iphone
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.
精彩评论