mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2025-01-18 17:02:49 +08:00
Fixed statusbar background view not auto-resizing on landscape.
This commit is contained in:
parent
e9414a4ab6
commit
b61eaae310
@ -48,6 +48,8 @@
|
||||
|
||||
_statusBarBackgroundView = [[UIView alloc] initWithFrame:frame];
|
||||
_statusBarBackgroundView.backgroundColor = [UIColor blackColor];
|
||||
_statusBarBackgroundView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin);
|
||||
|
||||
[self styleLightContent:nil]; // match default backgroundColor of #000000
|
||||
|
||||
NSString* setting;
|
||||
@ -72,11 +74,7 @@
|
||||
|
||||
if (statusBarOverlaysWebView) {
|
||||
|
||||
CGRect statusBarFrame = [UIApplication sharedApplication].statusBarFrame;
|
||||
CGRect bounds = self.viewController.view.bounds;
|
||||
bounds.origin.y = 0;
|
||||
bounds.size.height += statusBarFrame.size.height;
|
||||
|
||||
self.webView.frame = bounds;
|
||||
|
||||
[_statusBarBackgroundView removeFromSuperview];
|
||||
|
Loading…
Reference in New Issue
Block a user