I'm trying to implement a drag and drop UI for my UIView using the pan gesture recognizer. I have that piece of code working, but now I want to only execute the drag and drop logic only AFTER the user has long pressed on my to-be-dragged view.
I'm implementing the code in the below question Recognize long press and pan gesture recognizers together but it's not exactly what I want. Any idea?
Set up your view controller as the delegate of the pan gesture recognizer.
Implement the
gestureRecognizerShouldBegin(_:)
method. Return false until after the long press gesture recognizer fires.