Author Topic: Phone status bar difference between iOS and Android  (Read 4088 times)

CBYum

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Phone status bar difference between iOS and Android
« on: October 27, 2014, 11:27:20 AM »
We have to change our app to now have the phones system status bar at the top. I tested the "Status bar hidden" flag off on Android and it did as expected, showing the status bar and shifting the interface down by the appropriate amount. On trying the same with iOS it seems to only overlay it and not shift anything down. I tried "Black Opaque" and "Default" as the status bar style but neither seemed to give a different result. We are running with XCode 6 and NGUI 3.6.8 (later release notes don't say anything has been done with regards to the status bar).

We were hoping that the iOS would work the same as the Android build but are not sure if this is possible or it is a problem with NGUI?

bac9

  • Full Member
  • ***
  • Thank You
  • -Given: 2
  • -Receive: 4
  • Posts: 113
    • View Profile
Re: Phone status bar difference between iOS and Android
« Reply #1 on: October 27, 2014, 12:07:00 PM »
I think, as iOS status bars can be transparent, they have absolutely no influence on the resolution rendered by Unity - so your widgets have no reason to shift anywhere. You will most likely have to correct that manually (using, for example, a small script that will shift widgets down depending on the platform).

CBYum

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: Phone status bar difference between iOS and Android
« Reply #2 on: October 27, 2014, 12:10:45 PM »
So what is the "Black Opaque" option for? Is this no longer supported? If this has been implemented on Android for this switch surely it should also apply to the iOS opaque mode too?

bac9

  • Full Member
  • ***
  • Thank You
  • -Given: 2
  • -Receive: 4
  • Posts: 113
    • View Profile
Re: Phone status bar difference between iOS and Android
« Reply #3 on: October 27, 2014, 12:44:52 PM »
It simply tells the OS which status bar style to show, I'm not sure it was ever supposed to influence anything in your own screen.

CBYum

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: Phone status bar difference between iOS and Android
« Reply #4 on: October 28, 2014, 04:23:24 AM »
But this is inconsistent across platforms which should never be the case unless it is unavoidable. Unity is all about writing once and deploying to many and this is something that needs to be handled in the same way on both mobile platforms. I need to find out if the problem is a Unity or an NGUI one.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Phone status bar difference between iOS and Android
« Reply #5 on: October 29, 2014, 05:13:08 AM »
NGUI simply uses the screen size reported by Unity.