Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

Graves Robber
($1.99)

African Adventure
($0.99)

iTazer
($0.99)

ArtStudio
($3.99)

Pigs Vs Wolves
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-22-2009, 09:12 AM   #1 (permalink)
aschaef
New Member
 
Join Date: Jan 2009
Posts: 9
Default Help with e-mailing displayLabel text

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 assistance 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];
	
}
aschaef is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 23,591
Threads: 38,348
Posts: 168,506
Top Poster: smasher (2,539)
Welcome to our newest member, gotaway
Powered by vBadvanced CMPS v3.1.0

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