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

[GitHub] macdonst closed pull request #92: CB-13712 (iOS): fix overlaysWebView reset on rotation

macdonst closed pull request #92: CB-13712 (iOS): fix overlaysWebView reset on rotation
URL: https://github.com/apache/cordova-plugin-statusbar/pull/92
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 @@ -(void)cordovaViewWillAppear:(NSNotification*)notification
 
 -(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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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