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-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
 

» Advertisements
» Online Users: 725
22 members and 703 guests
14DEV, ADY, bass_rock, chaseacton, dacapo, danger ranger, dapis, fhsjaagshs, fkmtc, flamingliquid, GHuebner, jakerocheleau, JasonR, jimbo, melmoup, mer10, Punkjumper, Reyna, RickSDK, Rikco, Thompson22, tymex
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,558
Threads: 89,129
Posts: 380,260
Top Poster: BrianSlick (7,103)
Welcome to our newest member, thesooty
Powered by vBadvanced CMPS v3.1.0

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