Function

imp_implementationWithBlock

Creates a pointer to a function that calls the specified block when the method is called.

Declaration

IMP imp_implementationWithBlock(id block);

Parameters

block

The block that implements this method. The signature of block should be method_return_type ^(id self, self, method_args …). The selector of the method is not available to block. block is copied with Block_copy().

Return Value

The IMP that calls block. You must dispose of the returned IMP using the function.

See Also

Using Objective-C Language Features

objc_enumerationMutation

Inserted by the compiler when a mutation is detected during a foreach iteration.

objc_setEnumerationMutationHandler

Sets the current mutation handler.

imp_getBlock

Returns the block associated with an IMP that was created using imp_implementationWithBlock.

imp_removeBlock

Disassociates a block from an IMP that was created using imp_implementationWithBlock, and releases the copy of the block that was created.

objc_loadWeak

Loads the object referenced by a weak pointer and returns it.

objc_storeWeak

Stores a new value in a __weak variable.