I have uipageviewcontroller which contains VCs. As in any pageviewcontroller you can swipe left, right to change VCs. Everytime the animation finish I add gestureRecognizer to it. My question is how to check does view have specific recognizer or not? I need code like this:
if check view has specific recognizer == false {
add recognizer
}else{
just skip.
}
I am doing it because I have sidebarmenu. When Sidebarmenu appears I want to add gesture for current index pagecontentviewcontroller. So, My code works fine, I just dont want to add gesture everytime the animation finishes.
I am adding code. The problem is my gestures are created in other class(not current). First I am creating the instance of class where I keep gestures:
let transtionManger = TransitionManger()
After I add var of this class which is named exitPanGesture:
pageContentViewController.view.addGestureRecognizer(transtionManger.exitPanGesture3)
The problem is I add it everytime the view appears. I want to check the existence of gesture before adding it. I dont want to add it everytime.