Fix handling of touch gestures in iOS