我有一个 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/