Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-15077

iOS7: Support new UIStatusBarStyleLightContent style

    Details

      Description

      If you don't want your (lightweight) view to be positioned under the status bar, you can set top to 20. This will cause the main view's background color (set via Ti.UI.backgroundColor or image to be visible under the status bar.

      This works fine as long as the background color/image is light, because the status bar text is always black. On a dark (black) background, the only thing you will see is the green battery icon.

      To fix this, all we need is the new UIStatusBarStyleLightContent style to be exposed as an option for Ti.UI.iPhone.statusBarStyle. For example as Ti.UI.iPhone.StatusBar.LIGHT_CONTENT.

      Information can be found at: https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/TransitionGuide/Bars.html#//apple_ref/doc/uid/TP40013174-CH8-SW2

      To reproduce/test

      1. Create app: titanium create -p ios --id test.statusbar -n TestStatusBar
      2. Use as app.js:

            Ti.UI.backgroundColor = '#000';
            Ti.UI.createWindow({backgroundColor:'white', top: 20}).open();
            

      3. Run the app to see you can only see the green battery icon (as attached).
      4. Change the first line to:

            Ti.UI.backgroundColor = '#ddd';
            

      5. Run the app to see the text was actually there but not visible black on black.

        Attachments

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              fokkezb Fokke Zandbergen
              Reviewer:
              Sabil Rahim
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-17364
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration