【问题标题】:Objective C: Bold Message Body in MFMailComposeViewController目标 C:MFMailComposeViewController 中的粗体消息正文
【发布时间】:2013-04-02 02:25:56
【问题描述】:

我有这个代码

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>作为文本。

如何加粗?

【问题讨论】:

    标签: ios objective-c mfmailcomposeviewcontroller


    【解决方案1】:

    试试这个

    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];
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-03-19
      • 2021-07-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多