Hii everyone i'm just shifting from xcode8 to xcode9 and when i tryed to use gesture recognizer they xcode9 is showing some error
argument of #selector refers to instate method swipe(gesture) that is not > expose to obj c and here my code
override func viewDidLoad() {
super.viewDidLoad()
let swipeLeft = UISwipeGestureRecognizer(target: self, action: #selector(swipe(gestuer:)))
swipeLeft.direction = .left
self.view.addGestureRecognizer(swipeLeft)
}
func swipe(gestuer: UISwipeGestureRecognizer) {
if gestuer.direction == .left {
print("this is left swipe")
}
}
so is it xcode problem of something else
You need to use the @objc attribute on swipe(gestuer:) to use it with #selector.