Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-24-2009, 09:56 AM   #6 (permalink)
aschaef
New Member
 
Join Date: Jan 2009
Posts: 9
Default

Quote:
Originally Posted by aschaef View Post
My app is a single window app currently with a text label and a button. When you press the button the text label updates with random text from a local database. I'd like to add the functionality to e-mail the current display text with a separate e-mail button down below. I am posting the current button functionality and was looking for some ***istance to see if it is possible to capture the current displayLabel text with a new button.

Current code:
Code:
/*!
    @function	tapButtonPressed
    @discussion This function is called when "Tap Me Now" button is pressed
    @param      sender
    @result     displays the random text from the database in Label
*/
-(IBAction)tapButtonPressed:(id)sender
{	
	ShakeMeAppDelegate *appDelegate = (ShakeMeAppDelegate *)[[UIApplication sharedApplication] delegate];
	
	NSInteger randomNumber = [self getRandomIndex];
	//NSLog(@"Selected shake text is %@", [[appDelegate.shakeTexts objectAtIndex:randomNumber] text]);
	displayLabel.text = [[appDelegate.shakeTexts objectAtIndex:randomNumber] text];
	
}
Does the email function need to go within the button tap function, or can i just reference the displayLabel.text in a separate button press function?
aschaef is offline   Reply With Quote
 

» Advertisements
» Online Users: 745
17 members and 728 guests
AppAnnex, carpi, dfvdan, Domele, Gurpartap Singh, her-ur, juggler, melmoup, nathanrose, nidie, Pavel Volobuev, PetarPM, phackdat, sneaky, Tambourin, V_SC&, Xaron
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,836
Threads: 89,209
Posts: 380,643
Top Poster: BrianSlick (7,129)
Welcome to our newest member, abbylowin
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:35 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.