I\'m trying to discover what the UIButton title is for which UIButton was pressed in the following code.
on viewDidLoad the button title is outputted to the console usin
In your action:
- (void) buttonPressed:(UIButton*) sender { NSLog(@"The button title is %@",sender.titleLabel.text); }
Edit: Or as commented Iulian: sender.currentTitle, but it may be nil, see the comments of Michael.
sender.currentTitle
nil