You button is trying use the selector back
on your SleepModeViewController
, but you've actually named the method -goBackOne
. You fix it, either rename the -goBackOne
method to -back
, or change the name of the selector to goBackOne
. For example:
// The selector must actually match a method name on the target
[backButton addTarget:self action:@selector(goBackOne) forControlEvents:UIControlEventTouchUpInside];
It's important that the selector name and method names match. The error shows that your problem is that the selector named -back
doesn't exist. When your app terminates with these errors, you should check that all your @selector()
statements match actual method names.