2

Can anyone let me know what the following error means in iOS Objective-C:

Terminating app due to uncaught exception 'NSRangeException', reason: '-[NSCFArray objectAtIndex:]: index (13) beyond bounds (13)'

1 Answer 1

7

It means that your index is not within the valid range for your array. Your array has 13 elements and you are trying to access the 14th element. In C, indexes start at 0, so arrays have indexes that are valid from 0 to length - 1.

This is typically caused by an off by one error.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks a lot jason.... i solved my problem....u were right i was trying to access 14th element,which was not there thanks a lot

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.