簡體   English   中英

將背景設置為透明后,iOS UINavigationController顯示黑屏

[英]iOS UINavigationController after setting background to transparent shows black screen

我的UINavigationController有一個很奇怪的問題。 我正在嘗試在UINavigationController呈現不透明的UIViewController ,並且我想看到模糊的先前控制器內容。 我將alpha設置為UIViewController視圖:

view.alpha = 0.9

然后我嘗試擺脫UINavigationController背景:

navigationController?.view.backgroundColor = .clear

最初,在UINavigationController動畫過渡期間,一切看上去都很好,但是動畫完成后, UINavigationController背景變為黑色。 僅當顏色為透明時才存在此問題。

也許其他人遇到了這個問題?

如果您以模態顯示導航控制器,請嘗試將其modalPresentationStyle設置為.overFullScreen

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM