I can use [NSArray indexOfObject: NSString] to get an index of my search for 1 item. But what can I use or do to get an array of returned indices from my search?
thanks
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.
To get multiple indices, you can use
indexesOfObjectsPassingTest::Support for blocks were added in iOS 4. If you need to support earlier versions of iOS,
indexesOfObjectsPassingTest:isn’t an option. Instead, you can useindexOfObject:inRange:to roll your own method: