How to use dark mode in simulator iOS 13?

后端 未结 8 1889
迷失自我
迷失自我 2020-12-04 10:35

While I am developing the iOS app I need to test it in simulator with dark mode option so I can get more clarity about the app UI. But when I go to the Setting I am not gett

8条回答
  •  无人及你
    2020-12-04 11:15

    Alternatively, you can also switch the appearance programmatically (docs):

    override func viewDidLoad() {
        super.viewDidLoad()
        #if DEBUG
        // change the appearance only while testing  
        overrideUserInterfaceStyle = .dark
        #endif
    }
    

提交回复
热议问题