Sometimes the uigesturerecognizer that we add cannot be identified, and the reason for analysis is at least three possible:
- -(BOOL) Gesturerecognizer: (Uigesturerecognizer *) Gesturerecognizer Shouldrecognizesimultaneouslywithgesturerecognizer: (Uigesturerecognizer *) Othergesturerecognizer;
- -(BOOL) Gesturerecognizershouldbegin: (Uigesturerecognizer *) Gesturerecognizer;
- -(BOOL) Canbepreventedbygesturerecognizer: (Uigesturerecognizer *) Preventinggesturerecognizer;
corresponding serial number, respectively explained:
- A gesture action that may trigger multiple gestures, this interface asks if these gestures can coexist.
- eg: a transverse scrollview A, with a vertical self-scrollview B, an oblique swipe gesture (intended to be horizontal), may only respond to the vertical slide of B, and the horizontal of a you expect does not occur.
- Solution: Identify your gesture in this interface and return YES. Be careful not to magnify it.
- Gestures may occur, such as in some special cases, do not want to let this gesture occur, return No.
- Some gestures didn't happen because they were blocked by other gestures. Typically like uitapgesturerecognizer gestures, a uitapgesturerecognizer never blocks a higher tap count UITapGestureRecognizer.
Sometimes uigesturerecognizer gesture can not be identified problem analysis and solutions