I have the following code in my app, specifically in viewDidLoad:
that sets up my UISearchController
.
self.searchController = [[UISear
Or we can write an extension on Swift (version 2, but you can translate it to 3 easily):
extension UISearchController {
override public func preferredStatusBarStyle() -> UIStatusBarStyle{
if Theme.lightTheme() {
return UIStatusBarStyle.Default
}
else {
return UIStatusBarStyle.LightContent
}
}
}
Where Theme
is a class that regulate app colour theme.