我有这段代码
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>
显示为文字。
我如何加粗呢?
答案 0 :(得分:2)
试试这个
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];