*** 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.
精彩评论