[英]Status Bar Text Color on iPhone XR is different
從StackOverflow已經檢查過的答案可以更改整個應用程序的狀態欄顏色,方法是將info.plist中View controller-based status bar appearance
UIStatusBarStyleLightContent
為NO
,將Status bar style
UIStatusBarStyleLightContent
為UIStatusBarStyleLightContent
。
好吧,它確實從iPhone XS和更低版本改變了,但iPhone XR和iPhone XS Max卻沒有,仍然是純黑色。 我試圖在代碼中查找是否有一個名為UIStatusBarStyleDefault
的代碼,但我在任何地方都看不到。 我當前的解決方法是將[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
在didFinishLaunchingWithOptions
。 有什么想法嗎? 謝謝
在iOS 12中, Info.plist
View controller-based status bar appearance
NO
設置將不再起作用。 您必須將其設置為YES
。 建議您采用解決方法。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.