Handling double status bar

When a) in a call, or b) using the personal hotspot feature, the iPhone displays an extra status bar line, so the status bar is suddenly 40 lines high rather than the normal 20.

I have a Back button in the Top Left corner of my app, which is then partially obscured while this extra status bar line is shown.

Is there any way I can fix this?
[import]uid: 73434 topic_id: 33938 reply_id: 333938[/import]

Never seen that myself but do you position your button based on display.statusBarHeight? [import]uid: 13560 topic_id: 33938 reply_id: 134929[/import]

What happens if you check display.statusBarHeight?
As far as I know, the height of the statusbar should change when this happens.

EDIT:
Ooops. Looks like somebody beat me to it with the same answer :slight_smile: [import]uid: 70847 topic_id: 33938 reply_id: 134931[/import]

Does this mean I have to override absolutely all screen positions manually with this value?

[import]uid: 73434 topic_id: 33938 reply_id: 134939[/import]

I’m assuming that you normally have the status bar enabled in your app.
As a test, what happens if you disable the status bar with display.setStatusBar(display.HiddenStatusBar)?

I think it can be quite tricky to handle this situation though.

Some ideas off the top of my head would be:

  • slide the button down when you detect that there’s an extra bar
  • slide the stage down 20px assuming that nothing else gets cut off at the bottom
  • scale the stage so that all content is visible

[import]uid: 70847 topic_id: 33938 reply_id: 134944[/import]

Never seen that myself but do you position your button based on display.statusBarHeight? [import]uid: 13560 topic_id: 33938 reply_id: 134929[/import]

What happens if you check display.statusBarHeight?
As far as I know, the height of the statusbar should change when this happens.

EDIT:
Ooops. Looks like somebody beat me to it with the same answer :slight_smile: [import]uid: 70847 topic_id: 33938 reply_id: 134931[/import]

Does this mean I have to override absolutely all screen positions manually with this value?

[import]uid: 73434 topic_id: 33938 reply_id: 134939[/import]

I’m assuming that you normally have the status bar enabled in your app.
As a test, what happens if you disable the status bar with display.setStatusBar(display.HiddenStatusBar)?

I think it can be quite tricky to handle this situation though.

Some ideas off the top of my head would be:

  • slide the button down when you detect that there’s an extra bar
  • slide the stage down 20px assuming that nothing else gets cut off at the bottom
  • scale the stage so that all content is visible

[import]uid: 70847 topic_id: 33938 reply_id: 134944[/import]