Skip to content

Ability to set status bar color in iOS without using an Action Bar #1779

@JWiseCoder

Description

@JWiseCoder

Not all pages in iOS will have an action bar, but it is often necessary to change the status bar color on these pages. However, in the current implementation, that does not seem to be possible.

Without an Action Bar, setting the navigation bar style has no effect:

// Does nothing when the action bar is hidden
topmost().ios.controller.navigationBar.barStyle = UIBarStyle.Black

And using the page.backgroundSpanUnderStatusBar (as described here) does not work either, regardless of what the background color of the page is set to. (The source doesn't even appear to use this property anywhere at all).

What we really need is a property that can be set on a Page that will change the return value of preferredStatusBarStyle (and call setNeedsStatusBarAppearanceUpdate so that the ui updates properly). Otherwise, there's nothing that can be done to set the status bar color on a page that does not have an action bar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions