I have one UITextField that has a value and one UILabel that has text. I have added an in-app email button that works. I would like to add the UITextField’s value and the UILabel’s text to the body of the email.
Example code:
if ([MFMailComposeViewController canSendMail]) {
[composer setToRecipients:[NSArray arrayWithObjects:@"tkw1976@gmail.com" , nil]];
[composer setSubject:@"Subject"];
[composer setMessageBody:@"This is the body" isHTML:NO];
[self presentModalViewController:composer animated:YES];
I would like the messageBody to look like this:
sandwiches(UILabel) 10(UITextField)
You’re practically there. Make connections for your
UILabelandUITextField, and then set the text of the message by