Prepares the undo manager for invocation-based undo with the given target as the subject of the next undo operation.
SDKs
- iOS 3.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
func prepare(withInvocationTarget target: Any) -> Any
Parameters
target
The target of the undo operation.
The undo manager maintains a weak reference to
target
.
Return Value
A proxy object that forwards messages to the undo manager for recording as undo actions.