PDA

View Full Version : How to obtain properties from a button and send to label?




Ferny84
Feb 3, 2011, 07:06 PM
I have a keypad where if the user pushes a number (lets say 1) and it gets sent to a label.

This is what I have so far, i'm trying to use myButton titleLabel.

-(IBAction)numberPressed:(id)sender
{
NSLog(@"number pressed");
UIButton *myButton = ( UIButton* ) sender;
NSString *buttonLabel= [myButton titleLabel].text;

}