I have a uipageviewcontroller that contains a VC. As with any pageview controller, you can scroll left, the right to change the VC. Every time the animation ends, I add gestureRecognizer to it. My question is how to check if a certain recognizer has a look or not? I need a code:
if check view has specific recognizer == false { add recognizer }else{ just skip. }
I do this because I have sidebarmenu. When Sidebarmenu appears, I want to add a gesture for the current pagecontentviewcontroller index. So, my code works fine, I just don't want to add a gesture every time the animation ends.
I am adding code. The problem is that my gestures are created in another class (not the current one). First, I create an instance of the class in which I save the gestures:
let transtionManger = TransitionManger()
After adding var to this class called exitPanGesture:
pageContentViewController.view.addGestureRecognizer(transtionManger.exitPanGesture3)
The problem is that I add it every time a view appears. I want to check for gestures before adding it. I do not want to add it every time.
source share