I am using good control SWRevealViewController
, but by some redone I want to track my own swipe gestures on my screen. So how can I switch off swipe options? I want to work only revealToggle
method that attached to my button. Did someone faced with this? Thank you
In order to disable the swipe gesture you can simple do:
self.revealViewController.panGestureRecognizer.enabled=NO;
For example:
-(void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
self.revealViewController.panGestureRecognizer.enabled=NO;
}
-(void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
self.revealViewController.panGestureRecognizer.enabled=YES;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With