Instance Method

registerUndoWithTarget:handler:

Records a single undo operation for a given target so that when an undo is performed, it executes the specified block.

Declaration

- (void)registerUndoWithTarget:(id)target handler:(void (^)(id target))undoHandler;

Parameters

target

The target of the undo operation.

undoHandler

A block to be executed when an operation is undone.

The block takes a single argument, the target of the undo operation.

See Also

Registering Undo Operations

- registerUndoWithTarget:selector:object:

Registers the selector of the specified target to implement a single undo operation that the target receives.

- prepareWithInvocationTarget:

Prepares the undo manager for invocation-based undo with the given target as the subject of the next undo operation.

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