-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ios): statusbar ui issue fixed #11458
Conversation
|
iphone/Classes/TiUIiOSProxy.m
Outdated
@@ -258,6 +261,20 @@ - (void)didReceiveMemoryWarning:(NSNotification *)notification | |||
[super didReceiveMemoryWarning:notification]; | |||
} | |||
|
|||
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You wrap the method inside this #if
guard, but register for the notification on all SDK versions. Could this lead to a crash when building with SDK < 13.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That code snippet is also inside #if guard . See complete code-
#if IS_SDK_IOS_13 UIWindow *keyWindow = UIApplication.sharedApplication.keyWindow; CGRect frame = keyWindow.windowScene.statusBarManager.statusBarFrame; UIView *view = [keyWindow viewWithTag:TI_STATUSBAR_TAG]; if (!view) { view = [[UIView alloc] initWithFrame:frame]; view.tag = TI_STATUSBAR_TAG; [keyWindow addSubview:view]; } view.frame = frame; view.backgroundColor = [[TiUtils colorValue:value] _color]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidBecomeKey:) name:UIWindowDidBecomeKeyNotification object:nil]; #endif
Replaced above #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 with #if IS_SDK_IOS_13 to be more consistent with code. Though both are same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duh, i totally missed that since it wasn't showing in the diff. Thanks for updating the constant though, consistency is always good!
FR Passed. |
https://jira.appcelerator.org/browse/TIMOB-27735