Status bar mixing with background

Hi there,

I set the status bar to be visible in my app, we’re talking IOS 8, but since I have a dark backgrond the SB it’s almost undistinguishable from the background with the exeption of the battery green symbol.

Is there a way to make the status bar elements white and/or glowing, or should I just change the portion of  background behind the SB???

Thanks!

 http://www.doubleencore.com/2013/09/developers-guide-to-the-ios-7-status-bar/

Looks like because we can’t add a ‘UINavigationController’ (to which the status bar will automatically adjust its colour and transparency) we need to control the content under the status bar to make sure it is readable.

You could just add a 20pt white rectangle with an alpha of say 0.5 so you can still see a bit of the background while making the text readable.

Thank you NIck,

that’s what I suspected. Anyway do you have a quick tip on how to create such rectangle giving it proper coordinates to stick in the right position across devices??

I’m still struggling with object positioning on multi-platform apps and that would be really appreciated!

Ok, I made it this way if anyone’s interested and/or has better solutions:

local sbBackdrop = display.newRect( display.contentCenterX, display.screenOriginY , 360, 40 ) sbBackdrop.alpha = 0.7

The status bar will not always be 40 pixels high. I would use:

math.ceil(display.topStatusBarContentHeight)

But you have to increment by 4 if it’s an iPhone 6 Plus. I was at Corona HQ for lunch last week and asked them about this; the response was that they special-case the status bar height for some devices and may not have (as of the daily build I was using from last month) have special-cased the 6 Plus.

Also, why not use a translucent status bar? I asked for this to be added, and Brent and <dchan> were kind enough to do that back in August for Android Kitkat or above:

http://forums.coronalabs.com/topic/49846-corona-status-bar-bug-problem-implementing-material-design-for-android-l/

 http://www.doubleencore.com/2013/09/developers-guide-to-the-ios-7-status-bar/

Looks like because we can’t add a ‘UINavigationController’ (to which the status bar will automatically adjust its colour and transparency) we need to control the content under the status bar to make sure it is readable.

You could just add a 20pt white rectangle with an alpha of say 0.5 so you can still see a bit of the background while making the text readable.

Thank you NIck,

that’s what I suspected. Anyway do you have a quick tip on how to create such rectangle giving it proper coordinates to stick in the right position across devices??

I’m still struggling with object positioning on multi-platform apps and that would be really appreciated!

Ok, I made it this way if anyone’s interested and/or has better solutions:

local sbBackdrop = display.newRect( display.contentCenterX, display.screenOriginY , 360, 40 ) sbBackdrop.alpha = 0.7

The status bar will not always be 40 pixels high. I would use:

math.ceil(display.topStatusBarContentHeight)

But you have to increment by 4 if it’s an iPhone 6 Plus. I was at Corona HQ for lunch last week and asked them about this; the response was that they special-case the status bar height for some devices and may not have (as of the daily build I was using from last month) have special-cased the 6 Plus.

Also, why not use a translucent status bar? I asked for this to be added, and Brent and <dchan> were kind enough to do that back in August for Android Kitkat or above:

http://forums.coronalabs.com/topic/49846-corona-status-bar-bug-problem-implementing-material-design-for-android-l/