![](/img/trans.png)
[英]NavigationController Transparent And Background Image On Swift
[英]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.