For instance, how could I verify if there is an item at the index 3?
The objects in the NSArray are instantiated from the class “Animal.”
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, since
NSMutableArrayhas to hold non-nil objects, as long as the array is big enough, you know there’s something at indexi:If you needed to check something elsek, like say make sure it didn’t have a reference to the NSNull singleton, you could then check