I\'m trying to create a sliding menu (kind of like in Facebook/Twitter apps) and my version successfully uses pan gestures for this effect. The class is called \"SlideMenu\"
I also had some issues with it, the source of my problem was that the
gestureRecogniser.cancelsTouchesInView
property is true
by default, which caused a weird delay effect on my UISlider when tried to drag it.
This solved
gestureRecogniser.cancelsTouchesInView = false
ps.: also make sure the delaysTouchesBegan, delaysTouchesEnded
are set to false
Basically, in whichever controller or view you are handling the gesture recognizer. When you create the gesture recognizer, you can set its delegate to some object (probably your view controller) and have this object implement the UIGestureRecognizerDelegate
. One of the delegate call-backs is gestureRecognizer:shouldReceiveTouch
, and so you just have to copy the code you placed above into your object's (view controller's) implementation.