Skip to content

Support status bar styles without action bar on iOS #7153

@Frederiks96

Description

@Frederiks96

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
});

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions