Protocol

NSFastEnumeration

A protocol that objects adopt to support fast enumeration.

Overview

The abstract class NSEnumerator provides a convenience implementation that uses nextObject() to return items one at a time.

Topics

Enumeration

func countByEnumerating(with: UnsafeMutablePointer<NSFastEnumerationState>, objects: AutoreleasingUnsafeMutablePointer<AnyObject?>, count: Int)

Returns by reference a C array of objects over which the sender should iterate, and as the return value the number of objects in the array.

Required.

Constants

struct NSFastEnumerationState

This defines the structure used as contextual information in the NSFastEnumeration protocol.

See Also

Iteration

class NSEnumerator

An abstract class whose subclasses enumerate collections of objects, such as arrays and dictionaries.

struct NSIndexSetIterator

An iterator suitable for enumerating the elements of an index set.

struct NSEnumerationOptions

Options for block enumeration operations.

struct NSSortOptions

Options for block sorting operations.