GitToTheHub commented on PR #1695: URL: https://github.com/apache/cordova-ios/pull/1695#issuecomment-5422990024
I think the code should be improved for `prefersStatusBarHidden` and `showStatusBar:`. `statusBar.alpha` will only be changed if `showStatusBar:` will be called: https://github.com/apache/cordova-ios/blob/f525ec9ec8b434f79928c66dff2bca06e178066d/CordovaLib/Classes/Public/CDVViewController.m#L896-L902 First improvement: `statusBar.hidden` should be set here accordingly. Since calling `showStatusBar:` is the only place where `statusBar.alpha` could be set to `1` or `0`, which is only to make the real status bar appear or disappear by `prefersStatusBarHidden`, it would be better to add a property named `statusBarHidden` which is for hidding/showing the real status bar. I renamed `statusBar` to `statusBarBackground` in PR #1700 to make a better distinction between the real status bar and our own background. Using `statusBar.alpha` by hidding/showing the real status bar seems for me misleading as for e.g. the real status bar would be shown when `self.statusBar.alpha` is `1.000000` but `self.statusBar.hidden` is `YES`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
