重用 MFMailComposeViewController
我有一个基于 TabBar 的应用程序构建的应用程序,其中我需要一个基本上是电子邮件编辑器的选项卡。 所以我尝试使用 MFMailComposeViewController 作为选项卡之一。 这似乎工作正常,直到我真正用控制器发送电子邮件。 如果我这样做,MFMailComposeViewController 的视图就会消失并且无法再次使用。
如果我正确阅读文档,则 MFMailComposeViewController 通常以模态方式使用,但它也应该以非模态方式工作。
这就是我将其添加到选项卡栏的方式......
MFMailComposeViewController *mailController = [[MFMailComposeViewController alloc] init];
mailController.title = @"Feedback";
mailController.tabBarItem.image = [UIImage imageNamed:@"pencil.png"];
[array addObject:mailController];
tabBarController.viewControllers = array;
I have an app that is built on the TabBar-based app in which I need to have one tab that is basically an email composer. So I'm trying to use a MFMailComposeViewController as one of the tabs. This seems to work fine until I actually go to send an email with the controller. If I do this the MFMailComposeViewController's view disappears and can't be used again.
If I'm reading the docs correctly, the MFMailComposeViewController is normally used modally, but it is supposed to work non-modally as well.
This is how I am adding it to the tab bar...
MFMailComposeViewController *mailController = [[MFMailComposeViewController alloc] init];
mailController.title = @"Feedback";
mailController.tabBarItem.image = [UIImage imageNamed:@"pencil.png"];
[array addObject:mailController];
tabBarController.viewControllers = array;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用
并隐藏它
如果是这样那么只需评论驳回。
You you using
and hides it with
If so then just comment dismissing.