i am working with an app which takes signature in image view. and im using SWRevealViewController for side menu. my app looks like this.
class CaptureSignature: UIViewController,UIImagePickerControllerDelegate,UINavigationControllerDelegate,UIGestureRecognizerDelegate {
im writing below code to show side menu
override func viewDidLoad() {
super.viewDidLoad()
let revealViewController = self.revealViewController()
menuBtn.addTarget(revealViewController, action: #selector(SWRevealViewController.rightRevealToggle(_:)), for: .touchUpInside)
revealViewController?.panGestureRecognizer()?.isEnabled = true
}
now my problem is, while im swiping on image view from right to left, instead of drawing a line, side menu is opening.(because i have enabled panGesture in SWRevealViewController).
What i dont want is, i dont want to enable swipe gesture on imageView to show menu bar when i swipe right. i wrote the below func but its not working(even it is not entering into method when i put breakpoints in it)
func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
if let touchedView = touch.view, touchedView.isDescendant(of: imageView) {
print("touched in image view")
return false
}
return false
}
can any one help me please.