Sometimes uigesturerecognizer gesture can not be identified problem analysis and solutions

Source: Internet
Author: User

Sometimes the uigesturerecognizer that we add cannot be identified, and the reason for analysis is at least three possible:

    1. -(BOOL) Gesturerecognizer: (Uigesturerecognizer *) Gesturerecognizer Shouldrecognizesimultaneouslywithgesturerecognizer: (Uigesturerecognizer *) Othergesturerecognizer;
    2. -(BOOL) Gesturerecognizershouldbegin: (Uigesturerecognizer *) Gesturerecognizer;
    3. -(BOOL) Canbepreventedbygesturerecognizer: (Uigesturerecognizer *) Preventinggesturerecognizer;

corresponding serial number, respectively explained:

    1. A gesture action that may trigger multiple gestures, this interface asks if these gestures can coexist.
    2. 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.
    3. Solution: Identify your gesture in this interface and return YES. Be careful not to magnify it.
    4. Gestures may occur, such as in some special cases, do not want to let this gesture occur, return No.
    5. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.