I am getting unrecognized selector sent
error in my iOS application. I tried solving the issue based on the answers mentioned in other similar thread but failed. Please have a look at the code below and help me with this.
Thanks
class ThirdViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
let leftSwipe = UISwipeGestureRecognizer(target: self, action: Selector(("HandleSwipes:")))
let rightSwipe = UISwipeGestureRecognizer(target: self, action: Selector(("HandleSwipes:")))
leftSwipe.direction = .left
rightSwipe.direction = .right
view.addGestureRecognizer(leftSwipe)
view.addGestureRecognizer(rightSwipe)
}
func HandleSwipes(sender: UISwipeGestureRecognizer) {
//if(sender.direction == .left)
//{
// tabBarController?.selectedIndex = 1
//}
}
}