繁体   English   中英

当模态在NavigationController中时背景不透明

[英]Background not transparent when modal is in NavigationController

我有一个具有blurview作为背景的viewcontroller,以便您可以看到底层的viewcontroller。

除非您想在navigationController中显示modalviewcontroller,否则这非常有用。 然后,您会看到模糊视图一秒钟,然后它只是白色,看不到底层的viewcontroller。

我试图将navigationcontroller.view.backgroundColor设置为清除,但这不起作用。

我该如何实现?

 let vc: FilterViewController = FilterViewController()
 vc.modalPresentationStyle = .overFullScreen
 vc.delegate = self
 let navCtrl = UINavigationController(rootViewController: vc)
 navCtrl.view.backgroundColor = .clear
 self.navigationController?.present(navCtrl, animated: true, completion: nil)

您想要一个屏幕模糊另一个屏幕吗? 这不是那么容易,但是可能...

在此处输入图片说明

将此粘贴到这里有点困难,所以会给你一个链接

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM