[英]Custom Dark Mode iOS Issue
Three enums are set to achieve: UIUserInterfaceStyleUnspecified
-> To listen to iOS setting mode change UIUserInterfaceStyleLight
-> To override LIGHT mode irrespective of iOS setting mode UIUserInterfaceStyleDark
-> To override DARK mode irrespective of iOS setting mode
當我設置時出現問題
(Parent_ViewController -> UIUserInterfaceStyleDark)
和
(Child_ViewController -> UIUserInterfaceStyleUnspecified)
然后,當我們將設置 iOS 模式從淺色切換到深色或反之亦然時, Child_ViewController
的 UI 沒有變化,並且UIUserInterfaceStyleUnspecified
它應該已經改變,但它總是有深色主題 colors。
是否有任何解決方法或解決方案來解決此問題?
歡迎!
ViewController 在覆蓋界面樣式時將停止將系統更改傳播到子控制器。 這也意味着當overrideUserInterfaceStyle
設置為.unspecified
時,子 VC 將繼承其父級的界面樣式。
如果您想實現該特定行為,恐怕您需要一些自定義實現。 例如,通過將您總是希望變暗的部分設置為具體(非動態)colors,而不是使用動態系統 colors。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.