nativescript-playground-bar
A plugin for your NativeScript Playground projects to help implement a light or dark content status bar.
Installation
- From the Playground UI select
Add NPM package
(via the Explorer popup menu). - Enter
nativescript-playground-bar
as the NPM package name. - Click Add.
Usage
// main-page.js
const PlaygroundBar = require("~/nativescript-playgroundbar");
exports.pageLoaded = function (args) {
PlaygroundBar.lightContent(args.object);
}
Methods
lightContent
Sets the iOS
status bar to light content.
Arguments | Required | Default | Description |
---|---|---|---|
page | yes | n/a | The current page with the status bar you want to change. |
timeout | no | 10 | Specifies the time (in milliseconds) you want to delay the change of style. |
darkContent
Sets the iOS
status bar to dark content, which is the playgrounds default style.
Arguments | Required | Default | Description |
---|---|---|---|
page | yes | n/a | The current page with the status bar you want to change. |
timeout | no | 10 | Specifies the time (in milliseconds) you want to delay the change of style. |