1
-(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> %@/%@/%@         Price: %@%@ </b></br><hr>  %@ </br><hr></br><hr>  Gross Wt: %0.2f gms         Net Wt.: %@ gms </br><hr>  Dia: %d/%0.2f cts                 Col.Stone: %d/%0.2f cts</td></tr></table></font>",
[mailer setMessageBody:emailBody isHTML:YES];
[self presentModalViewController:mailer animated:YES];
}
這裏emailBody被轉換成pdf然後發送郵件,在這裏我不想編輯任何東西,或禁用鍵盤。將nsstring轉換爲pdf格式然後發送郵件
不要你需要使用'[MFMailComposeViewController addAttachmentData]'? – trojanfoe
你想發送pdf文件或html數據? –
我想將html作爲pdf文件發送,或者我不想在郵件正文中編輯任何內容,至少可以禁用鍵盤 – raz