Instance Property

canUndo

A Boolean value that indicates whether the receiver has any actions to undo.

Declaration

var canUndo: Bool { get }

Discussion

true if the receiver has any actions to undo, otherwise false.

The return value does not mean you can safely invoke undo() or undoNestedGroup()—you may have to close open undo groups first.

See Also

Checking Undo Ability

var canRedo: Bool

A Boolean value that indicates whether the receiver has any actions to redo.