Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 重用MFMailComposeViewController_Iphone_Uitabbarcontroller_Email - Fatal编程技术网

Iphone 重用MFMailComposeViewController

Iphone 重用MFMailComposeViewController,iphone,uitabbarcontroller,email,Iphone,Uitabbarcontroller,Email,我有一个应用程序,是建立在基于TabBar的应用程序,我需要有一个标签,基本上是一个电子邮件作曲家。所以我尝试使用MFMailComposeViewController作为选项卡之一。这似乎工作得很好,直到我真的去与控制器发送电子邮件。如果我这样做,MFMailComposeViewController的视图将消失,无法再次使用 如果我正确阅读了文档,那么MFMailComposeViewController通常是以模式使用的,但它也应该以非模式工作 这就是我将其添加到选项卡栏的方式 MFMai

我有一个应用程序,是建立在基于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;
你在用什么

- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
把它藏起来

[self dismissModalViewControllerAnimated:YES];
如果是这样的话,那就评论一下吧