I had an issue with my iOS phonegap app having the status bar overlap the webview in iOS 7. I found this answer which fixed the problem, but the second step, calling
[self setNeedsStatusBarAppearanceUpdate];
in viewDidLoad
causes the app to crash in iOS 6 and throw unrecognized selector
.
In the future, if you ever need to use something from iOS 7, such as setNeedsStatusBarAppearanceUpdate
and you need to still support earlier iOS versions, you can first check if the selector is supported:
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)])
{
[self setNeedsStatusBarAppearanceUpdate];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With