ios - 为 uipopoverview 使用导航 Controller 的最佳方式

标签 ios objective-c uinavigationcontroller uipopovercontroller

我想从 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/

相关文章:

ios - 用户拒绝使用生物识别时的生物识别类型

ios - 错误: Unsupported compiler 'GCC 4.2' selected for architecture 'i386'

android - PhoneGap 体验

ios - UICollectionView 在加载 facebook 视频 URL 时卡住

ios - 调用 popViewController Animated : 时如何更改父 View 中的内容

ios - AVAudioRecorder 和 AirPlay 镜像

ios - 禁用 GPUImageMovieWriter 上的所有音频

ios Google Cloud Messaging (GCM) 没有收到远程通知

ios - 完成转换时的 io7 导航检查

iphone - 对 <UINavigationController : 0xa98e050> 的开始/结束外观转换的不平衡调用