TJ VanToll
TJ VanToll

Reputation: 12704

NativeScript—Cannot change iOS status bar color since 2.0

Historically I’ve used the following approach to switch an iOS status bar to use white text.

<Page loaded="loaded">
    <Page.actionBar>
        <ActionBar title="Whatever"></ActionBar>
    </Page.actionBar>
</Page>

var frameModule = require("ui/frame");
exports.loaded = function(args) {
    var page = args.object;
    if (page.ios) {
        var navigationBar = frameModule.topmost().ios.controller.navigationBar;
        navigationBar.barStyle = UIBarStyle.UIBarStyleBlack;
    }
};

Unfortunately this approach doesn’t seem to work anymore after the NativeScript 2.0 release. Any idea what might be up?

Thanks.

Upvotes: 2

Views: 378

Answers (1)

Vladimir Enchev
Vladimir Enchev

Reputation: 915

The issue is already fixed in our @next build. We will release it officially as 2.0.1 most probably next week.

Upvotes: 1

Related Questions