テーブルを作成できました。しかし、値をテーブルに渡すことができません。
- (IBAction)openMail:(id)sender {
if ([MFMailComposeViewController canSendMail])
{
MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init];
mailer.mailComposeDelegate = self;
[mailer setSubject:@"Shopping Cart "];
NSArray *toRecipients = [NSArray arrayWithObjects:@"fisrtMail@example.com", @"secondMail@example.com", nil];
[mailer setToRecipients:toRecipients];
NSString *e=self.phone;
NSString *f=self.cost;
//NSString *emailBody = [NSString stringWithFormat:@"%@%@%@%@",e,@" ",f,@" has been purchased successfully"];
NSString *emailBody=@"<html> <table border=1> <thead><tr><td>Item</td><td>Name</td><td>Qty</td><td>Price</td></tr></thead><tbody><tr><td>1</td><td>1</td><td>One</td><td>One</td></tr><tr><td>2</td><td>Two</td><td>Two</td><td>Two</td></tr><tr><td>3</td><td>Three</td><td>Three</td><td>Three</td></tr><tr><td>4</td><td>Four</td><td>Four</td><td>Four</td></tr></tbody></table> </html> ";
[mailer setMessageBody:emailBody isHTML:YES];
[self presentModalViewController:mailer animated:YES];
//[mailer release];
}
上記のように値「e」と「f」をhtmlのテーブルに渡す必要があります。よろしければご返信いただけますでしょうか。