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
feat(statusbar): Simple built-in status bar support (#1523)
* fix: Prevent recursion in scrollView monkeypatch
If you call scrollView on a UIView that does not have its own scrollView
method, this hijack method will keep recursively calling itself until
you run out of stack space. Try to guard against that by making sure
that it's not getting called on the same instance multiple times.
TODO: Think about thread safety, but in theory because this is
view-related stuff it's only safe to run on the main thread.
* feat(statusbar): Simple built-in status bar background
This adds a background behind the status bar automatically when a page
does not request to extend itself behind the status bar using a meta tag
with `viewport-fit=cover`. It automatically shows and hides as the value
of the viewport-fit option changes.
On iOS 16.4 and newer, it will be coloured according to the meta
`theme-color` tag, and a default colour can be set in the storyboard for
a CDVViewController.
We expose a very basic JS API hanging off the existing
`window.statusbar` property that allows controlling the visibility (of
the status bar contents entirely, not just of the background view) and
overriding the background colour.
The colour is determined as follows:
1. Any colour set explicitly with the JS API (if any)
2. Any colour pulled from the meta tag (iOS 16.4+, if any)
3. The default colour specified in the storyboard (if any)
4. The background colour specified in the storyboard (if any)
5. The default system background colour
Efforts were made to ensure that this does not interfere with the
existing CDVStatusBar plugin implementation (although maybe this can
replace it for most common use cases), by making the display of this
built-in conditional on not having the CDVStatusBar plugin installed.
* feat(statusbar): Hook up StatusBarBackgroundColor
0 commit comments