Ios MFMailComposeViewController中的HTML
我是Xcode新手,我正在使用使用MFMailComposeViewController的邮件应用程序。我想用HTML设计我的*messageBody。实际上,这是一本小书,一个会议应用程序。所以我想输入日期和时间字段,以便用户可以选择日期和时间。但当我运行我的应用程序时,我不能在日期和时间字段中输入任何内容。这是我的密码。希望我能得到一些帮助Ios MFMailComposeViewController中的HTML,ios,objective-c,html,mfmailcomposeviewcontroller,Ios,Objective C,Html,Mfmailcomposeviewcontroller,我是Xcode新手,我正在使用使用MFMailComposeViewController的邮件应用程序。我想用HTML设计我的*messageBody。实际上,这是一本小书,一个会议应用程序。所以我想输入日期和时间字段,以便用户可以选择日期和时间。但当我运行我的应用程序时,我不能在日期和时间字段中输入任何内容。这是我的密码。希望我能得到一些帮助 - (IBAction)BookAMeeting:(id)sender { //email subject NSString *ema
- (IBAction)BookAMeeting:(id)sender {
//email subject
NSString *emailTitle = @"Haven Support";
//email content
NSMutableString *messageBody = [NSMutableString string];
[messageBody appendString:@"<h1>Please Enter the following feilds to book a meeting.</h1>\n"];
[messageBody appendString:@"<form>NAME: <input type = 'text' name='fname'> \n <br>TIME: <input type = 'time' name='timee'><br>\n DATE: <input type = 'date' name='date'><br>"];
//to address
NSArray *toRecipents = [NSArray arrayWithObject:@"xyz@hotmail.com"];
MFMailComposeViewController *mc = [[MFMailComposeViewController alloc]init];
mc.mailComposeDelegate = self;
[mc setSubject:emailTitle];
[mc setMessageBody:messageBody isHTML:YES];
[mc setToRecipients:toRecipents];
//present mail view controller on screen
[self presentViewController:mc animated:YES completion:NULL];
}
为什么你要在电子邮件中添加HTML表单?您的目标是什么?@rmaddy,因为我想让用户选择日期和时间,然后才能发送有关预订会议的电子邮件。我不知道这是否可能。您可以编写代码用户界面来获取所需的值。您无法通过电子邮件获得用户输入。如果有的话,您可以发送一封电子邮件,其中包含用户通过应用程序选择的数据,但您无法通过电子邮件获得输入。@rmaddy感谢您消除我的困惑,因为我是xcode新手。你能给我一些建议吗?如果你同意的话,用户如何选择他们的日期和时间。谢谢你,这是一个广泛的问题的评论方式。做一些研究并尝试一些代码。当你在某个特定的问题上陷入困境时,发布一个特定于该问题的问题。享受