From dfd099958152ea0f3c9e2f4af9a3a7ee5ff6e0bc Mon Sep 17 00:00:00 2001 From: Shazron Abdullah Date: Fri, 3 Apr 2015 12:34:06 -0700 Subject: [PATCH] CB-4930 - (prefix) InAppBrowser should take into account the status bar --- src/ios/CDVInAppBrowser.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m index 6d141d3..24f56c4 100644 --- a/src/ios/CDVInAppBrowser.m +++ b/src/ios/CDVInAppBrowser.m @@ -975,6 +975,20 @@ @implementation CDVInAppBrowserNavigationController : UINavigationController +- (void) viewDidLoad { + + CGRect frame = [UIApplication sharedApplication].statusBarFrame; + + // simplified from: http://stackoverflow.com/a/25669695/219684 + + UIToolbar* bgToolbar = [[UIToolbar alloc] initWithFrame:frame]; + bgToolbar.barStyle = UIBarStyleDefault; + [self.view addSubview:bgToolbar]; + + [super viewDidLoad]; +} + + #pragma mark CDVScreenOrientationDelegate - (BOOL)shouldAutorotate