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];
}