burkeholland / nativescript-statusbar

A NativeScript plugin to change the style of the status bar. Currently ios only.
MIT License
32 stars 14 forks source link

Works in VueJS too !!! #21

Open hgc2002 opened 5 years ago

hgc2002 commented 5 years ago

Here are the tips:

My page code:

<template>
    <Page class="page" 
        backgroundSpanUnderStatusBar="true"
        actionBarHidden="true">
        <StatusBar ios:barStyle="light" barColor="#23D5AB" />
        ...
    </Page>
</template>

Another tricks.js file that I import before in main.js with some tricks, workarounds and so on...

require("nativescript-vue").registerElement(
    "StatusBar",
    () => require("nativescript-statusbar").StatusBar
);

And that's it !!!

DhiDev commented 5 years ago

Hey Do you know how to hide the status bar in nativescript vue?

Jonarod commented 5 years ago

@hgc2002 could you tell if this code you provided works on iOS as well ? It does not on my iPhone, leaving an ugly colored line under the statusBar...

Woongsik commented 3 years ago

Hi, I am using nativescript-vue and the barColor is working well, but not barStyle on IOS. Is there any work around? light, dark, all other barStyle gives same textColor as black!