Trying to do the following:
NSMutableArray *tmpArr = [_tweets subarrayWithRange:NSMakeRange(0, 10)];
_tweets = [[NSMutableArray alloc] init]; // added this in trial and error debugging
_tweets = tmpArr;
_tweets
is an NSMutableArray
and I'm trying to grab the first 10 objects from it.
However, I receive the following error:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 157 beyond bounds [0 .. 9]'
Any ideas?