Status Bar iOS (Color and Size)

I’ve got the status bar turned on currently, but I can’t figure out how to make it light. I’ve followed all the StackOverflow tutorials, but none of those involve JUCE code and the framework we work in. Also, mine seems much larger than the home screen one. Any help would be great.

To make the text in the status bar white you can select “Transparent black style (alpha of 0.5)” for the “Status bar style” property in Resources/Info-App.plist in Xcode. Changing this to “Grey style (default)” makes the text black.

I don’t think you can change the background colour on more recent iOS versions. You can put a coloured box behind the transparent default though, which looks like you’ve changed the colour :slight_smile:

void paint (Graphics& g) override
{
    g.fillAll (Colours::red);

    auto r = g.getClipBounds();
    r.removeFromTop (20);
    g.reduceClipRegion (r);

    g.fillAll (Colours::blue);

    g.setFont (Font (16.0f));
    g.setColour (Colours::black);
    g.drawText ("Hello World!", getLocalBounds(), Justification::centred, true);
}

I made this change (setting Status Bar Style to Alpha) and the status bar remained black. I just did it again to double check and it remains black still. Not sure why. I’ll try that function override you provided. Thanks.

Thanks for the tip. I had the same issue.

But is there any way of preventing the plist file from being over-written by the Introjucer when I make a change there?

You can add your own items, the search reveals this answer:

Not sure if you can remove keys though…

HTH

Super.
Unfortunately, that pList setting only seems to be respected on iPhone SE and X, but not on 8 or earlier :frowning: