-(void)clicks:(id)sender{
UIButton *theButton = (UIButton*)sender;
NSString *theButtonTitle = [theButton titleForState:UIControlStateNormal]
NSLog(@"theButtonTitle :- %@", theButtonTitle);
label.text=theButtonTitle;
//Here a want to send the name of that clicked button current title
}
Try this code. I using following method to get title of button
titleForState:
Returns the title associated with the specified state. - (NSString *)titleForState:(UIControlState)state Parameters
state
The state that uses the title. The possible values are described in UIControlState.
Return Value
The title for the specified state. If no title has been set for the specific state, this method returns the title associated with the UIControlStateNormal state.
Read Documentation https://developer.apple.com/library/ios/documentation/uikit/reference/UIButton_Class/UIButton/UIButton.html#//apple_ref/occ/instm/UIButton/titleForState: