Gestures are up-and-coming in iOS 13. iOS 13 lets you swipe left with three fingers to undo; but you can always shake your iPhone in iOS 12 and earlier to undo as well. To toggle this feature on and off, go to Settings > General > Accessibility > Shake to Undo.