If i change the
ViewController, you can set the selected appearance mode for that viewController regardless of the iOS settings, but this Is there a way to apply it to (viewController)?
After setting overrideUserInterfaceStyle, I wonder what to call some methods, but I can't find the right one. Is there a way to restart the whole worst application?
Answer # 1
If the view is a UIWindow object, the new style applies to everything in the window, including the root view controller and all presented content.Because it was written
, it changed automatically with ↓.
UIApplication.shared.keyWindow? .rootViewController? .overrideUserInterfaceStyle = .dark
The reason why it didn't change automatically was that UIWindow could not be acquired properly.
- swift - i am making an application that purchases the items selected in collection view an error occurs when changing screens
- i want to make my own quiz posting application with swift
- swift - how to transition from the tutorial screen when the application is first started to the first screen with a button
- swift - about the slide show application production
- [swift] about screen transition of ios application
- swift - about the timer application for iphone application development intensive course
- cordova - i want to set font settings for the entire application with ionic4
- swift - please tell me how to write extensions that apply only to [indexpath]?
- Analysis of application examples of apply () in JS
- How to use color more conveniently in Swift development application
- Android programming method to exit the entire application
- Method for running Swift application in Mac OS terminal
- Swift method to add reminder number to IOS application icon