Undo and Redo
Many apps allow people to shake the device to undo and redo certain operations, such as typing or deleting. When initiated in this manner, an alert asks the user to confirm or cancel the undo or redo operation.
Briefly and precisely describe the operation to be undone or redone. The undo and redo alert title automatically includes a prefix of “Undo ” or “Redo ” (including the trailing space). You need to provide an additional word or two that describe what’s being undone or redone, to appear after this prefix. For example, you might create alert titles such as “Undo Name” or “Redo Address Change.”
If you use the shake gesture for undo and redo, don’t use it for other actions. Although you can programmatically give multiple meanings to the shake gesture, you run the risk of confusing people and making your app unpredictable.
Provide undo and redo buttons sparingly. It’s confusing when apps provide multiple ways to perform the same task. If your app truly warrants dedicated undo and redo buttons, use the standard system-provided icons and put them in an expected location, such as a navigation bar.
Perform undo and redo operations in the current context only. Undo and redo should have a clear and immediate effect on the current context, not an earlier one.
For implementation details, see Undo Architecture.