How to change the status bar color in iOS8 extension?

UIApplicationnot allowed inside the extension, preferredStatusBarStyleand setNeedsStatusBarAppearanceUpdatein UIViewControllerignored. Any other ideas?

+4
source share
1 answer

1) edit the Info.plist file.

View the status bar status based on the No controller (type Boolean).

2) Edit the AppDelegate file.

In the application (_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) Write this code.

UIApplication.shared.statusBarStyle = .lightContent

http://www.problemstucks.com/iOS-interview-part-7.html

-1
source

All Articles