I have multiple UITextFields and I want to attach them to an in app email. I can get one of them appear but not the rest. Here is what I am using.
MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init];
[composer setMailComposeDelegate:self];
[composer setSubject:@"My Subject"];
[composer setMessageBody:AddNotesTextField.text isHTML:YES];
[self presentModalViewController:composer animated:YES];
[composer release];
Thank you
You got it right already for the body using:
So just repeat the procedure with the other fields like so:
Or if you are asking how to use the input from multiple text fields into the body of the email, you simply have to use
NSString‘sstringWithFormat:In string with format, you escape the default string to add a string using “%@” for every instance where you want to insert some other string. Then after the original string ends you enter the names of the input strings separated by commas.
[NSString stringWithFormat:@"%@%@",x,y]