I created an iOS application to search items from an UITableView. But when I type ‘ag..’,’as…’ and for several other occurances, suddenly app gets crash. It gives the exception
`* Terminating app due to uncaught exception ‘NSRangeException’, reason: ‘* -[NSMutableArray objectAtIndex:]: index 37 beyond bounds [0 .. 36]’
what can I do to solve this problem.
Thanks,
It pretty much tells you exactly what the problem is: the valid range for your mutable array is 0 to 36 and you’re asking for element number 37.
I’m not sure whether you have an off-by-one error (i.e., you’re counting from one rather than zero) or you’re looking for an element that doesn’t exist, but that’s what your exception is.