I am new to Swift language and I want to implement a swipe gesture to my image so that I can change the page with it. For example when you received a whatsapp notification on any iPhone home screen. But when I am adding swipe gesture programmatically it gives me this error.
let rightSwipe = UISwipeGestureRecognizer(target: swipeImage, action: Selector("handleSwipe:"))
rightSwipe.direction = .Right
view.addGestureRecognizer(rightSwipe)
the error is when I am giving the id of my UIImage named swipeImage it gives me unrecognized selector sent to instance but when I give it named self it doesn't give me an error. But i want to add swipe gesture to my image. I hope I explained my problem.
Edit 1: Eventhough i changed the target to self.swipeImage it gives me the same error. Also I added addGestureRecognizer to my image by changing view to swipeImage but it does not work too
Thanks.