I have a UIViewController with a LongPressGesturerecognizer attached.
There is also a UITextField in the view controllers view.
If I tap on the UITextField, the Gesturerecognizer catches the long press. Copy, paste, cursor oving is not possible.
I would like to have the Gesturerecognizer be active anywhere in the view except the UITextField, where I would like the default OS behaviour like copy, paste, move the cursor etc.
Is that possible? Can I somehow tell the gesture recognizer to forward the gesture to the UITextFields default?
You have to set a delegate to your
UILongPressGestureRecognizerand implement thegestureRecognizer:shouldReceiveTouch:delegate method like this: