Search code examples
iphoneshakensundomanager

Does NSUndoManager work on iPhone without shake gestures?


I have an app that uses the shake gesture for something else besides undo. I want to use NSUndoManager and all the examples and how-tos say I have to put the following line in my applicationDidFinishLaunching method.

application.applicationSupportsShakeToEdit = YES;

Is it possible to use NSUndoManager without supporting the shake to undo gesture?


Solution

  • Sure. Create an Undo button, then:

    - (IBAction)undoButtonPressed {
        [myUndoManager undo];
    }