I want to change status bar style when presenting a view controller, and change it back when returning from it, this is my code:
In presented:
override func viewWillAppear(_ animated: Bool) {
UIApplication.shared.statusBarStyle = .lightContent
}
In presenting:
override func viewWillAppear(_ animated: Bool) {
UIApplication.shared.statusBarStyle = .default
}
My info.plist:
- View controller-based status bar appearance = NO
- Status bar style = default
The animation seemed quite intrusive, am I able to animate the change?