UndoControlleris a general-purpose recorder of operations for undo and redo.
NoteYou register an undo operation by specifying the object that’s changing (or the owner of that object), along with a method to invoke to revert its state, and the arguments for that method. When performing undo an
UndoControllersaves the operations reverted so that you can redo the undos. It differs from Foundation’s
NSUndoManagerin that groups are not created automatically for each cycle of the run loop and that each step of a group can be undone rather than just the whole group.
@objcMembers @objc(PESDKUndoController) open class UndoController : NSObject