The app has a screen in which after giving the inputs, I tap OK button and it should perform input validation, if fine, then navigate and pass data back to the previous screen via protocol/delegate, otherwise, block navigation and display a warning pop-up.
This is my viewDidLoad:
override func viewDidLoad() {
super.viewDidLoad()
button.addTarget(self, action: "pushView:", forControlEvents: .TouchUpInside)
}
This is the pushView() function:
func pushView() {
//some codes to validate data and perform navigation
}
When I run the app in simulator, it crash when I tap the button and this is the error message:
2016-04-21 00:12:39.976 ToDo List[1795:1253192] -
[ToDo_List.AddReminderController pushView:]:
unrecognized selector sent to instance 0x7fa13ac16c40
2016-04-21 00:12:39.981 ToDo List[1795:1253192]
*** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '-
[ToDo_List.AddReminderController pushView:]:
unrecognized selector sent to instance 0x7fa13ac16c40'
There may be an issue with sender or selector but I don't know what it exactly means.