I just want override dark mode UI in my application. I added UIUserInterfaceStyle
is Light
. But i am not sure it is not working. Is there any other option?
window!.overrideUserInterfaceStyle = .light
You can get the window from SceneDelegate
or any view.window
viewController.overrideUserInterfaceStyle = .light
You can set any viewController
, even inside the viewController itself
view.overrideUserInterfaceStyle = .light
You can set any view
, even inside the view itself
You may need to use if #available(iOS 13.0, *) { ,,, }
if you are supporting earlier iOS versions.