Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 3, 2011, 07:06 PM   #1
Ferny84
macrumors newbie
 
Join Date: Feb 2011
How to obtain properties from a button and send to label?

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;

}
Ferny84 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Send command by double clicking on label osx? canavid Mac Programming 1 Mar 19, 2014 01:19 AM
Beginners questions - showing a Label object and Push Button on the screen Gabberke Mac Programming 2 Jun 19, 2013 02:11 PM
NSMutableDictionary and a button to send changes Carll iPhone/iPad Programming 12 Jan 12, 2013 08:19 AM
All iPads: Apple wireless keyboard SEND button? iHawaii iPad Accessories 3 Nov 20, 2012 05:35 PM

Forum Jump

All times are GMT -5. The time now is 07:32 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC