Home ios gestures
Post
Cancel

ios gestures

UIGestureRecognizerDelegate

gestureRecognizer:shouldReceiveTouch:

Asks the delegate if a gesture recognizer should receive an object representing a touch.

gestureRecognizer:shouldReceivePress:

Asks the delegate if a gesture recognizer should receive an object representing a press.

gestureRecognizerShouldBegin:

Asks the delegate if a gesture recognizer should begin interpreting touches.

gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:

This method is called when recognition of a gesture by either gestureRecognizer or otherGestureRecognizer would block the other gesture recognizer from recognizing its gesture.

Note that returning YES is guaranteed to allow simultaneous recognition;

returning NO, on the other hand, is not guaranteed to prevent simultaneous recognition because the other gesture recognizer’s delegate may return YES.

gestureRecognizer

An instance of a subclass of the abstract base class UIGestureRecognizer. This is the object sending the message to the delegate.

能保证别人可以参与到自己的识别,不能保证自己不参与到别人的识别

互相返回NO,可以保证互相不干扰

location

translation

This post is licensed under CC BY 4.0 by the author.