Skip to content

Commit

Permalink
fix(ios): statusbar ui issue fixed (#11458)
Browse files Browse the repository at this point in the history
* fix(ios): statusbar ui issue fixed

* fix(ios): updated constant
  • Loading branch information
vijaysingh-axway authored Feb 5, 2020
1 parent 0939b69 commit 6a5664b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions iphone/Classes/TiUIiOSProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ - (void)setStatusBarBackgroundColor:(id)value
}
view.frame = frame;
view.backgroundColor = [[TiUtils colorValue:value] _color];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidBecomeKey:) name:UIWindowDidBecomeKeyNotification object:nil];
#endif
} else {
UIView *statusBar = [[[UIApplication sharedApplication] valueForKey:@"statusBarWindow"] valueForKey:@"statusBar"];
Expand Down Expand Up @@ -206,6 +207,8 @@ - (NSNumber *)PREVIEW_ACTION_STYLE_SELECTED

- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];

[super dealloc];
}

Expand Down Expand Up @@ -258,6 +261,20 @@ - (void)didReceiveMemoryWarning:(NSNotification *)notification
[super didReceiveMemoryWarning:notification];
}

#if IS_SDK_IOS_13
- (void)windowDidBecomeKey:(NSNotification *)notification
{
if ([TiUtils isIOSVersionOrGreater:@"13.0"]) {
UIWindow *keyWindow = UIApplication.sharedApplication.keyWindow;
CGRect frame = keyWindow.windowScene.statusBarManager.statusBarFrame;
UIView *view = [keyWindow viewWithTag:TI_STATUSBAR_TAG];
if (view) {
view.frame = frame;
}
}
}
#endif

#ifdef USE_TI_UIIOSALERTDIALOGSTYLE
- (TIUIiOSAlertDialogStyleProxy *)AlertDialogStyle
{
Expand Down

0 comments on commit 6a5664b

Please sign in to comment.