You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2017/12/27 15:44:00 UTC

[cordova-plugin-statusbar] branch master updated: CB-13712 (iOS): fix overlaysWebView reset on rotation (#92)

This is an automated email from the ASF dual-hosted git repository.

macdonst pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-statusbar.git


The following commit(s) were added to refs/heads/master by this push:
     new 8da38f5  CB-13712 (iOS): fix overlaysWebView reset on rotation (#92)
8da38f5 is described below

commit 8da38f5075ac165ea80fee39dc14f807a343c590
Author: jcesarmobile <jc...@gmail.com>
AuthorDate: Wed Dec 27 16:43:58 2017 +0100

    CB-13712 (iOS): fix overlaysWebView reset on rotation (#92)
---
 src/ios/CDVStatusBar.m | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/ios/CDVStatusBar.m b/src/ios/CDVStatusBar.m
index 37fb7cb..c67f137 100644
--- a/src/ios/CDVStatusBar.m
+++ b/src/ios/CDVStatusBar.m
@@ -97,8 +97,12 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
 
 -(void)statusBarDidChangeFrame:(NSNotification*)notification
 {
-    [self resizeStatusBarBackgroundView];
-    [self resizeWebView];
+    //add a small delay ( 0.1 seconds ) or statusbar size will be wrong
+    __weak CDVStatusBar* weakSelf = self;
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.1 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
+        [weakSelf resizeStatusBarBackgroundView];
+        [weakSelf resizeWebView];
+    });
 }
 
 - (void)pluginInitialize

-- 
To stop receiving notification emails like this one, please contact
['"commits@cordova.apache.org" <co...@cordova.apache.org>'].

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