Returns the index of the specified object.
SDKs
- iOS 5.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
- (NSUInteger)indexOfObject:(Object Type)object;
Parameters
object
The object.
Return Value
The index whose corresponding ordered set value is equal to object
. If none of the objects in the ordered set is equal to object
, returns NSNotFound.