Get the index of object in NSMutableArray
Just wanted to know if there is any method in NSMutableArray (or NSArray) which lets you get the index of a specific object? for exam开发者_JS百科ple if have an array which has a b c d e f g h i objects how can I get the index for like c or e or any other object?
NSArray has methods along the lines of indexOfObject: that will give you the index of an object. It all depends on what you're trying to accomplish. Read through the documentation at the links provided and you should find what you're looking for.
Have you already tried with indexOfObject
? Just look for it in the docs and you'll find it ;-)
精彩评论