ios - 使用 MFMailComposeViewController 编写 HTML 消息
<p><div>
<aside class="s-notice s-notice__info post-notice js-post-notice mb16"role="status">
<div class="d-flex fd-column fw-nowrap">
<div class="d-flex fw-nowrap">
<div class="flex--item wmn0 fl1 lh-lg">
<div class="flex--item fl1 lh-lg">
<b>这个问题在这里已经有了答案</b>:
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>以下是适合您的解决方案:</p>
<pre><code>MFMailComposeViewController *mailController = [ init];
mailController.mailComposeDelegate = self;
NSString *emailBody = @"<p>Here Your HTML Code</p>";
;
;
</code></pre>
<p>实现委托(delegate)</p>
<pre><code>- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0)
{
// Notifies users about errors associated with the interface
switch (result)
{
case MFMailComposeResultCancelled:
// message.text = @"Result: canceled";
break;
case MFMailComposeResultSaved:
// message.text = @"Result: saved";
break;
case MFMailComposeResultSent:
// message.text = @"Result: sent";
break;
case MFMailComposeResultFailed:
// message.text = @"Result: failed";
break;
default:
//message.text = @"Result: not sent";
break;
}
;
}
</code></pre></p>
<p style="font-size: 20px;">关于ios - 使用 MFMailComposeViewController 编写 HTML 消息,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/15288978/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/15288978/
</a>
</p>
页:
[1]