UITapGestureRecognizer not working on iOS9

前端 未结 4 1127
再見小時候
再見小時候 2020-12-21 03:08

I have an application which uses UITapGestureRecognizers which seem to not work in iOS9 Beta 2.

They are successfully calling

- (BOOL)g         


        
4条回答
  •  感动是毒
    2020-12-21 03:35

    I checked it via Xcode-7 beta 2

    I've created vc with gesturerecognizer and create outlets for property and action. in viewDidload setted delegate, like this: enter image description here

    All methods, that was called during debug - i've marked //called

    I received events to the next methods:

    func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldReceiveTouch touch: UITouch) -> Bool {
        print("worked")
        // called
        return true
    }
    
     func gestureRecognizerShouldBegin(gestureRecognizer: UIGestureRecognizer) -> Bool
     {
        //called
        print("worked")
        return true
    }
    
    
     func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldRequireFailureOfGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool
     {
        print("worked")
        //called
        return true
    }
    

    Try recreate project as i mentioned and check all your outlets and delegate

    Hope this helps

提交回复
热议问题