ios - 呈现 View Controller 上的模态视图 Controller

标签 ios objective-c modalviewcontroller presentviewcontroller uivisualeffectview

我有一个 View Controller ,我在另一个 View Controller 上以模态方式呈现,并且顶部 VC 的背景 View 具有模糊效果。当我使用以下代码时,顶部 View Controller 出现在底部 View Controller 上方,但顶部 Controller 隐藏在导航栏后面:

MOSettingsViewController *settingsViewController = [[MOSettingsViewController alloc]init];
settingsViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
settingsViewController.modalPresentationStyle = UIModalPresentationOverCurrentContext;
self.providesPresentationContextTransitionStyle = YES;
self.definesPresentationContext = YES;
[self presentViewController:settingsViewController animated:YES completion:nil];

当我删除行 settingsViewController.modalPresentationStyle... 时,新的 View Controller 出现在导航栏上,但呈现的 View Controller 变黑,并破坏了模糊效果。

如何获得这两个演示文稿的混合,其中呈现 View Controller 保持可见并且导航栏位于呈现 View Controller 下方?

最佳答案

我需要使用UIModalPresentationOverFullScreen,而不是使用UIModalPresentationOverCurrentContext

关于ios - 呈现 View Controller 上的模态视图 Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27592569/

相关文章:

iOS 通用应用程序似乎在手机上略微放大

iphone - animationDidStop 用于组动画

ios - 在后台启动 AVAssetExportSession

iphone - 使用 iFile 手动更改 Camera.app 设置?

ios - 在非 Cocos2d 应用程序上使用 Kamcord

ios - NSFetchedResultsController 未按预期获取

ios - 模拟弹出框的模糊效果时如何为屏幕截图创建蒙版图像

ios - 呈现/呈现 View Controller 和父/ subview Controller 之间的交互是否在任何地方记录?

iPhone模态视图-如何返回父父 Controller

ios - 从模态 ViewController 呈现 UIImagePickerController