我想从 popoverview
推送到另一个 View 。为此,我在那个弹出窗口中使用了一个导航 Controller 。而且它工作正常。
问题出现在第二个 View 中。为了允许用户发送电子邮件,我显示了一个邮件编辑器。但我有两个导航 Controller 。
这是第一个 popoverview 的代码:
SettingsVC *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"SettingsVC"];
vc.delegate = self;
UINavigationController *naviCon = [[UINavigationController alloc]initWithRootViewController:vc];
self.settingsPopover = [[UIPopoverController alloc] initWithContentViewController:naviCon];
CGRect frame = CGRectMake(974.f, 36.f, 0, 0);
self.settingsPopover.popoverContentSize = CGSizeMake(300, 250);
[self.settingsPopover presentPopoverFromRect:frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
最佳答案
当我需要类似的东西时,我从调用 PopoverController(父 ViewController)的 ViewController 调用了 MFMailComposeViewController,并且还在该 ViewController 中包含了委托(delegate)等。 我在 PopoverViewController 的 ContentViewController 中定义了一个协议(protocol),它在需要调用 MFMailComposeViewController 时通知父 ViewController。 一切都完美无缺...希望对您有所帮助
关于ios - 为 uipopoverview 使用导航 Controller 的最佳方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18398057/