Skip to content

Commit

Permalink
CB-13712 (iOS): fix overlaysWebView reset on rotation (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored and macdonst committed Dec 27, 2017
1 parent 6352d80 commit 8da38f5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ios/CDVStatusBar.m
Expand Up @@ -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
Expand Down

0 comments on commit 8da38f5

Please sign in to comment.