将重复的核心数据字符串添加到电子邮件

时间:2014-10-25 16:24:54

标签: ios xcode string email

我有一些核心数据字符串要添加到电子邮件中,因此当用户点击电子邮件按钮时,会拉出多个字符串。我只是不知道如何添加多个。

继承字符串 - (self.personquantityTextField.text)我想将(self.personroom5TextField.text)添加到电子邮件正文中。

NSString *emailBody = self.personquantityTextField.text;

[picker setMessageBody:emailBody isHTML:YES]; // depends. Mostly YES, unless you want to send it as plain text (boring)

2 个答案:

答案 0 :(得分:0)

你可以像这样组合两个NSString。

NSString *combinedStr = [NSString stringWithFormat:@"%@,%@", self.personquantityTextField.text, self.personroom5TextField.text];

答案 1 :(得分:0)

NSMutableString *body = [NSMutableString new];
[body appendString:self.someTextField.text];
[body appendString:self.someOtherTextField.text];
[body appendString:self.someThirdTextField.text];

[picker setMessageBody:body isHTML:YES];