I created a sidebar menu using the SWRevealViewController from GitHub. On my front View I have a textfield wich becomes first responder by default prompting the keyboard to pop up. Now when I use the pan gesture to open the sidebar menu I need the textfield to resign as first responder and vice versa to become first responder again when the sidebar menu is closed by pan gesture.
Can this be done by using the pan direction?
Code used to implement the SWRevealViewController functionality into my project:
if self.revealViewController() != nil {
myButton.addTarget(self.revealViewController(), action: #selector(SWRevealViewController.rightRevealToggle(_:)), forControlEvents: UIControlEvents.TouchUpInside)
self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
}