gpt4 book ai didi

ios - 在 ios 中的电子邮件正文中插入包含行和列的表格

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:17:35 27 4
gpt4 key购买 nike

我使用 MFMailComposeViewController 方法创建了电子邮件。我需要在电子邮件的消息正文中插入一个包含行和列的表格。所以请帮忙。

最佳答案

您可以将 html 设置为内容主体,并使用一些 html 代码在其中绘制表格。

MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
NSString *emailBody = @"<html>....</html>"; //html code for drawing table
[picker setMessageBody:emailBody isHTML:YES];

要在 html 中绘制表格,请使用类似的东西,

<table border=1>
<thead><tr><td>#</td><td>Name</td></tr></thead>
<tbody>
<tr><td>1</td><td>One</td></tr>
<tr><td>2</td><td>Two</td></tr>
<tr><td>3</td><td>Three</td></tr>
<tr><td>4</td><td>Four</td></tr>
</tbody>
</table>

关于如何使用html代码绘制表格的更多详细信息,您可以查看一些stackoverflow问题,例如HTML Table different number of columns in different rows

关于ios - 在 ios 中的电子邮件正文中插入包含行和列的表格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13677920/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com