I need to detect long-press on a UITextView, which already recognises long-press thus it has a long press recognizer, can I create a new one and add to it? How will it work then, two recognizers will get the same callback when you long-press?
Thanks!
Just add two
UILongPressRecognizers with different selectors (initWithTarget:selector:) to the view. It should work just like you think it will work. You may need to returnYESfrom your delegate’s-gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:when both of yourUILongPressRecognizersare invoked simultaneously.Note that you will likely encounter problems with Apple’s recognizer for popping up the magnifier loupe.