Instance Method

reverseObjectEnumerator()

Returns an enumerator object that lets you access each object in the array, in reverse order.

Declaration

func reverseObjectEnumerator() -> NSEnumerator

Return Value

An enumerator object that lets you access each object in the array, in order, from the element at the highest index down to the element at index 0.

Discussion

When you use this method with mutable subclasses of NSArray, you must not modify the array during enumeration.

It is more efficient to use the fast enumeration protocol (see NSFastEnumeration). Fast enumeration is available in macOS 10.5 and later and iOS 2.0 and later.

See Also

Querying an Array

func contains(Any)

Returns a Boolean value that indicates whether a given object is present in the array.

var count: Int

The number of objects in the array.

var firstObject: Any?

The first object in the array.

var lastObject: Any?

The last object in the array.

func object(at: Int)

Returns the object located at the specified index.

subscript(Int)

Returns the object at the specified index.

func objects(at: IndexSet)

Returns an array containing the objects in the array at the indexes specified by a given index set.

func objectEnumerator()

Returns an enumerator object that lets you access each object in the array.