So I have NSArray that contains objects like {117, 22}{http://t.co/7l3oiMDQt3}
and I want to get 117
and 22
I tried to use ObjectAtIndex:
and the app was crashed and then added this:
if(array.count > 0) {
NSLog(@"%@",[array objectAtIndex:1]);
}
and still the app crashes.
is there's any other way to get the NSRange
location and length from the array?
EDIT:
The objects inside the array is NSDataDetector
that gets the links form a string.
it says this when it crashes:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*[__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0]'
***