开发者

Please help me out with this exception

开发者 https://www.devze.com 2023-02-03 01:58 出处:网络
*** Terminating app due to uncaught exception \'NSRangeException\', reason: \'*** -[NSMutableArray objectAtIndex:]: index 0 beyond bounds for empty array\'
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSMutableArray objectAtIndex:]: index 0 beyond bounds for empty array'
*** Call stack at first throw:

In my TableViewController I am loading list of arrays..... with selected its display's its detailedViewController... When I get back and selected the same index or another index i g开发者_C百科et this exception NSRangeException...

I dont know what to do ?

Can any one help me out.


The array is empty at that point. A good idea is, add some lines of code like this:

NSLog(@"\n\n here, there are this many items: %d \n\n", [yourArrayName count]);

put that line in everywhere possible, add it in at least ten places.

Open your console ("Run" menu in XCode).

You'll soon figure out what is going wrong! hope it helps.

0

精彩评论

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

关注公众号