Pan gesture interferes with UISlider

前端 未结 2 957
时光说笑
时光说笑 2020-12-20 12:01

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\"

2条回答
  •  暖寄归人
    2020-12-20 12:42

    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.

提交回复
热议问题