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
NSString * strButtonTitle = [btnButton titleForState:state];
where state:
UIControlStateNormal,
UIControlStateHighlighted,
UIControlStateDisabled,
UIControlStateSelected,
UIControlStateFocused,
UIControlStateApplication,
UIControlStateReserved
For your requirement
NSString * strButtonTitle = [btnButton titleForState:UIControlStateSelected];
This is the method for getting the title for different states of button at any given time in the program...But based on the question answer from Zaphod is good.