I've been looking around to find a solution to this, but can't seem to find one that works for me. How to do two actions for one UIButton in iOS Objective C.
My app contain "login user" and "guest user".
UITableView
enquiry button navigate to one controller. UITableView
enquiry button navigate to another controllerYou can try like this
- (IBAction)navigateToEnquire:(id)sender {
NSLog(@"Button pressed: %@", [sender currentTitle]);
if ([[sender currentTitle] isEqualToString: @"login user"]) {
// do something
} else if ([[sender currentTitle] isEqualToString: @"guest user"]) {
// do something
}
}