index(ofObjectPassingTest:)
Returns the index of the object in the ordered set that passes a test in a given block.
Declaration
func index(ofObjectPassingTest predicate: (Any, Int, UnsafeMutablePointer<ObjCBool>) -> Bool) -> IntParameters
- predicate:
The block to apply to elements in the ordered set.
The block takes three arguments:
Return Value
The index of the corresponding value in the ordered set that passes the test specified by predicate. If no objects in the ordered set pass the test, returns NSNotFound.
See Also
Accessing Set Members
contains(_:)enumerateObjects(at:options:using:)enumerateObjects(_:)enumerateObjects(options:using:)firstObjectlastObjectobject(at:)subscript(_:)objects(at:)index(of:)index(of:inSortedRange:options:usingComparator:)index(ofObjectAt:options:passingTest:)index(_:ofObjectPassingTest:)indexes(ofObjectsAt:options:passingTest:)indexes(ofObjectsPassingTest:)