Executes a given block using each object in the array, starting with the first object and continuing through the array to the last object.
- iOS 4.0+
- macOS 10.6+
- tvOS 9.0+
- watchOS 2.0+
The block to execute for each object in the array.
The block takes three arguments:
The index of the object in the array.
A reference to a Boolean value. Setting the value to
YESwithin the block stops further enumeration of the array. If a block stops further enumeration, that block continues to run until it’s finished.
This method executes synchronously. Values allocated within the block are deallocated after the block is executed.