Instance Method

countByEnumeratingWithState:objects:count:

Returns by reference a C array of objects over which the sender should iterate.

Declaration

- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(K  _Nullable *)buffer count:(NSUInteger)len;

Parameters

state

Context information that is used in the enumeration to, in addition to other possibilities, ensure that the collection has not been mutated.

objects

A C array of objects over which the sender is to iterate.

len

The maximum number of objects to return in objects.

Return Value

The number of objects returned in objects. Returns 0 when the iteration is finished.

See Also

Enumerating Dictionaries

- keyEnumerator

Provides an enumerator to access the keys in the dictionary.

- objectEnumerator

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

- enumerateKeysAndObjectsUsingBlock:

Applies a given block object to the entries of the dictionary.

- enumerateKeysAndObjectsWithOptions:usingBlock:

Applies a given block object to the entries of the dictionary, with options specifying how the enumeration is performed.