You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by jc...@apache.org on 2016/12/22 22:52:42 UTC

cordova-plugin-inappbrowser git commit: CB-10799 (ios) fix toolbar is shown in incorrect position when in-call status bar

Repository: cordova-plugin-inappbrowser
Updated Branches:
  refs/heads/master d26ccd1f4 -> d735649fc


CB-10799 (ios) fix toolbar is shown in incorrect position when in-call status bar

 This closes #203


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/d735649f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/d735649f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/d735649f

Branch: refs/heads/master
Commit: d735649fcd9e8ebd9e3fc84e48b9315380dc2b2d
Parents: d26ccd1
Author: Julio C�sar <jc...@gmail.com>
Authored: Wed Dec 21 00:39:25 2016 +0100
Committer: Julio C�sar <jc...@gmail.com>
Committed: Thu Dec 22 23:51:51 2016 +0100

----------------------------------------------------------------------
 src/ios/CDVInAppBrowser.m | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/d735649f/src/ios/CDVInAppBrowser.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m
index 4646972..335e59c 100644
--- a/src/ios/CDVInAppBrowser.m
+++ b/src/ios/CDVInAppBrowser.m
@@ -29,6 +29,7 @@
 #define    kInAppBrowserToolbarBarPositionTop @"top"
 
 #define    TOOLBAR_HEIGHT 44.0
+#define    STATUSBAR_HEIGHT 20.0
 #define    LOCATIONBAR_HEIGHT 21.0
 #define    FOOTER_HEIGHT ((TOOLBAR_HEIGHT) + (LOCATIONBAR_HEIGHT))
 
@@ -1041,11 +1042,11 @@
 
 - (void) viewDidLoad {
 
-    CGRect frame = [UIApplication sharedApplication].statusBarFrame;
-
+    CGRect statusBarFrame = [self invertFrameIfNeeded:[UIApplication sharedApplication].statusBarFrame];
+    statusBarFrame.size.height = STATUSBAR_HEIGHT;
     // simplified from: http://stackoverflow.com/a/25669695/219684
 
-    UIToolbar* bgToolbar = [[UIToolbar alloc] initWithFrame:[self invertFrameIfNeeded:frame]];
+    UIToolbar* bgToolbar = [[UIToolbar alloc] initWithFrame:statusBarFrame];
     bgToolbar.barStyle = UIBarStyleDefault;
     [bgToolbar setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
     [self.view addSubview:bgToolbar];


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org