2013-04-02 67 views
1

大膽郵件正文我有這樣的代碼目標C:在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]; 

以填補MFMailComposeViewController內容現在我想做的是讓姓名,地址,城市,國家,聯繫電話,E郵件和消息要大膽。我所做的是插入<strong>,但結果是錯誤的,它也顯示<strong>作爲文本。

我將如何能夠大膽呢?

回答

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