How to Undo on the iPhone
Your iPhone comes equipped with a small keyboard for entering text. Unfortunately, typing on your iPhone is not the easiest task. The keys are very close together and accidental deletions and typos are a common occurrence. Before you panic, you should try the "Undo" feature. The iPhone comes with an easy undo typing option that is accessible with the flick of your wrist.
Open up an application that requires typing, such as Mail, Notes or Safari.
Enter text using your keyboard.
Shake your iPhone.
Press "Undo Typing."