2

我有这个代码

NSString *messageBody = [NSString stringWithFormat:@"Name: %@\nCompany/Institution: %@\nAddress: %@\nCity: %@\nCountry: %@\nContact Number: %@\nE-Mail: %@\n \n \n Message: %@", rName.text, rCompany.text, rAddress.text, rCity.text, rCountry.text, rContactNumber.text, rEmail.text, rDescription.text];
    [tempMailCompose setMessageBody:messageBody isHTML:NO];

现在我要做MFMailComposeViewController的就是将姓名、地址、城市、国家、联系电话、电子邮件和消息设置为粗体。我所做的是插入<strong>,但结果是错误的,它也显示<strong>为文本。

我怎么能加粗呢?

4

1 回答 1

4

试试这个

NSString *messageBody = [NSString stringWithFormat:@"Name: <b>%@</b><br/>Company/Institution: <b>%@</b><br/>Address: <b>%@</b><br/>City: <b>%@</b><br/>Country: <b>%@</b><br/>Contact Number: <b>%@</b><br/>E-Mail: <b>%@</b><br/> <br/> <br/> Message: <b>%@</b>", rName.text, rCompany.text, rAddress.text, rCity.text, rCountry.text, rContactNumber.text, rEmail.text, rDescription.text];
[tempMailCompose setMessageBody:messageBody isHTML:YES];
于 2013-04-02T02:40:21.880 回答