我有一些核心数据字符串要添加到电子邮件中,因此当用户点击电子邮件按钮时,会拉出多个字符串。我只是不知道如何添加多个。
继承字符串 - (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)
答案 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];