Objective C:MFMailComposeViewController 中的粗体消息正文

Cha*_*goy 3 objective-c ios mfmailcomposeviewcontroller

我有这个代码

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];
Run Code Online (Sandbox Code Playgroud)

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

我怎样才能加粗它?

小智 5

尝试这个

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];
Run Code Online (Sandbox Code Playgroud)