应用程序中的电子邮件视图无法关闭 - iPhone OS 4
我在添加用户向我自己(所述应用程序的制造商)发送支持电子邮件的功能时遇到困难。我已经让它工作得几乎完美,但是当您单击“取消”或单击“发送”时,视图不会关闭。感谢您的帮助!
这是代码:
MFMailComposeViewController *mail = [[[MFMailComposeViewController alloc] init] autorelease];
mail.mailComposeDelegate = self;
[mail setToRecipients:[NSArray arrayWithObject:@"[email protected]"]];
[mail setSubject:@"Fraction Calculator Lite Support"];
[self presentModalViewController:mail animated:YES];
I am having difficulties adding the ability for a user to send a support email to myself (the maker of said app). I have gotten it work almost perfectly however the view doesn't close when you click cancel, or when you click send. Thanks for the help!
Here is the code:
MFMailComposeViewController *mail = [[[MFMailComposeViewController alloc] init] autorelease];
mail.mailComposeDelegate = self;
[mail setToRecipients:[NSArray arrayWithObject:@"[email protected]"]];
[mail setSubject:@"Fraction Calculator Lite Support"];
[self presentModalViewController:mail animated:YES];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您将
self
设置为 MFMailComposeViewController 的委托。在 mailComposeController:didFinishWithResult:error: 中,请务必像这样调用:
You're setting
self
to be the MFMailComposeViewController's delegate. In mailComposeController:didFinishWithResult:error: be sure to calllike so:
您需要实现 MFMailComposeViewControllerDelegate 中的委托方法。
You need to implement the delegate method from
MFMailComposeViewControllerDelegate
.