How to obtain properties from a button and send to label?

Discussion in 'iPhone/iPad Programming' started by Ferny84, Feb 3, 2011.

  1. macrumors newbie

    Joined:
    Feb 3, 2011
    #1
    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.

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

Share This Page