File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ - (void)setStatusBarBackgroundColor:(id)value
142
142
}
143
143
view.frame = frame;
144
144
view.backgroundColor = [[TiUtils colorValue: value] _color ];
145
+ [[NSNotificationCenter defaultCenter ] addObserver: self selector: @selector (windowDidBecomeKey: ) name: UIWindowDidBecomeKeyNotification object: nil ];
145
146
#endif
146
147
} else {
147
148
UIView *statusBar = [[[UIApplication sharedApplication ] valueForKey: @" statusBarWindow" ] valueForKey: @" statusBar" ];
@@ -206,6 +207,8 @@ - (NSNumber *)PREVIEW_ACTION_STYLE_SELECTED
206
207
207
208
- (void )dealloc
208
209
{
210
+ [[NSNotificationCenter defaultCenter ] removeObserver: self ];
211
+
209
212
[super dealloc ];
210
213
}
211
214
@@ -258,6 +261,20 @@ - (void)didReceiveMemoryWarning:(NSNotification *)notification
258
261
[super didReceiveMemoryWarning: notification];
259
262
}
260
263
264
+ #if IS_SDK_IOS_13
265
+ - (void )windowDidBecomeKey : (NSNotification *)notification
266
+ {
267
+ if ([TiUtils isIOSVersionOrGreater: @" 13.0" ]) {
268
+ UIWindow *keyWindow = UIApplication.sharedApplication .keyWindow ;
269
+ CGRect frame = keyWindow.windowScene .statusBarManager .statusBarFrame ;
270
+ UIView *view = [keyWindow viewWithTag: TI_STATUSBAR_TAG];
271
+ if (view) {
272
+ view.frame = frame;
273
+ }
274
+ }
275
+ }
276
+ #endif
277
+
261
278
#ifdef USE_TI_UIIOSALERTDIALOGSTYLE
262
279
- (TIUIiOSAlertDialogStyleProxy *)AlertDialogStyle
263
280
{
You can’t perform that action at this time.
0 commit comments