0
-(void)sendmail
{
MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init];


[mailer setSubject:@"iOS School - MultipleAlertViews"];

NSArray *toRecipients = [NSArray arrayWithObjects:@"", nil];
[mailer setToRecipients:toRecipients];

NSString *        [emailBody appendString:[NSString stringWithFormat:@"<hr> <font face=\"verdana\" size=\"2\" color=\"black\"> <table width=\"700px\" border=\"1px;\"><tr><td width=\"200px\"><img src='%@' width=\"200\" height=\"200\"></td><td width=\"500px\"> <b>&nbsp%@/%@/%@ &nbsp &nbsp &nbsp &nbsp Price: %@%@ </b></br><hr>&nbsp %@ </br><hr></br><hr>&nbsp Gross Wt: %0.2f gms &nbsp &nbsp &nbsp &nbsp  Net Wt.: %@ gms </br><hr>&nbsp Dia: %d/%0.2f cts &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp Col.Stone: %d/%0.2f cts</td></tr></table></font>",



[mailer setMessageBody:emailBody isHTML:YES];

[self presentModalViewController:mailer animated:YES];
}

这里 emailBody 被转换成 pdf 然后发送邮件,在这里我不想编辑任何东西,或者禁用键盘。

4

1 回答 1

2

抱歉,这是不可能的,并且违反了苹果邮件 Compose-view,这意味着您的应用程序可能会因执行不可编辑的电子邮件撰写器而被拒绝。

我给你的唯一建议是创建一个自定义电子邮件视图控制器并实现它,而不是使用 Apple 提供的控制器。

另一种解决方案是通过调用Web 服务来发送 HTML 代码。

更多细节:

第三方框架使用

锁定 MFMailComposeViewController

于 2013-11-25T12:36:43.520 回答