mirror of
https://github.com/apache/cordova-plugin-statusbar.git
synced 2025-01-18 17:02:49 +08:00
fix(iOS): Delay resizeWebView on viewWillAppear for correct statusbar height (#157)
This commit is contained in:
parent
5f6614c3c1
commit
13645b9f53
@ -92,7 +92,11 @@ static const void *kStatusBarStyle = &kStatusBarStyle;
|
||||
|
||||
-(void)cordovaViewWillAppear:(NSNotification*)notification
|
||||
{
|
||||
[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 resizeWebView];
|
||||
});
|
||||
}
|
||||
|
||||
-(void)statusBarDidChangeFrame:(NSNotification*)notification
|
||||
|
Loading…
Reference in New Issue
Block a user