You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support status bar styles without action bar on iOS #7153
Is your feature request related to a problem? Please describe.
Currently, the status bar style is only applied while the action bar is visible. If (in a non-action bar page) the background of the page requires the status bar text to be white on both iOS and Android, the developer must make the action bar transparent, resulting in platform specific code, since this works on Android.
Describe the solution you'd like
The Page component respects the statusBarStyle property even if the action bar is hidden.
Describe alternatives you've considered
None.
Additional context
The simple solution is to implement a getter for the preferredStatusBarStyle computed property on UIViewController in page.ios.js:
Object.defineProperty(UIViewControllerImpl.prototype, "preferredStatusBarStyle", {
get: function () {
var owner = this._owner.get();
if(owner) {
// Assuming the statusBarStyle is of type 'string'
return owner.statusBarStyle === "dark" ? 1 : 0;
}
// No owner - default to standard
return 0;
},
enumerable: true,
configurable: true
});
Override preferredStatusBarStyle in the viewController of page and return the value of this property. When the property is updated, call viewController.setNeedsStatusBarAppearanceUpdate().
I tested a bit more and I also found these things that sound a bit off.
With two pages with a different color scheme, using swipe or pan morphs from one to the other.
When I use the back button in the same scenario, no morphing is done and target color is applied after the slideLeft is finished.
With the target page without actionBar, and I start panning, the target color is used instantly, and when I stop without completing the back navigation, the target color stays on the actionBar.
Activity
NickIliev commentedon Jan 10, 2020
+1 Requested via t.1448755
NickIliev commentedon Jan 10, 2020
NickIliev commentedon Jan 10, 2020
Additional information related to t.1448755
NickIliev commentedon Jan 10, 2020
The solution could be based on this solution
vakrilov commentedon Jan 15, 2020
The issue seems to be resolved with #8241.
Version already available in
next.