Instance Method

addExecutionBlock:

Adds the specified block to the receiver’s list of blocks to perform.

Declaration

- (void)addExecutionBlock:(void (^)(void))block;

Parameters

block

The block to add to the receiver’s list. The block should take no parameters and have no return value.

Discussion

The specified block should not make any assumptions about its execution environment.

Calling this method while the receiver is executing or has already finished causes an NSInvalidArgumentException exception to be thrown.

See Also

Managing the Blocks in the Operation

+ blockOperationWithBlock:

Creates and returns an NSBlockOperation object and adds the specified block to it.

executionBlocks

The blocks associated with the receiver.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software