nativescript-playground-bar
by Sam Donald | v1.0.0
Set the status bar in NativeScripts' Playground to light or dark content.
npm i --save nativescript-playground-bar

nativescript-playground-bar

A plugin for your NativeScript Playground projects to help implement a light or dark content status bar.

Installation

  1. From the Playground UI select Add NPM package (via the Explorer popup menu).
  2. Enter nativescript-playground-bar as the NPM package name.
  3. 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.