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

iOS7: showCamera shows status bar over camera view

    Details

      Description

      On iOS7, Ti.Media.showCamera is showing the status bar over the camera view, partially covering the flash and camera-switch controllers.

      Steps to reproduce

      1. Create a new app: titanium create -p ios -n testCamera --id test.camera -d .
      2. For app.js use the following, taken from the docs:

            var win = Titanium.UI.createWindow({
                backgroundColor: '#fff'
            });
         
            win.addEventListener('click', function() {
         
                Titanium.Media.showCamera({
                    success: function(event) {
                        // called when media returned from the camera
                        Ti.API.debug('Our type was: ' + event.mediaType);
                        if (event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {
                            var imageView = Ti.UI.createImageView({
                                width: win.width,
                                height: win.height,
                                image: event.media
                            });
                            win.add(imageView);
                        } else {
                            alert("got the wrong type back =" + event.mediaType);
                        }
                    },
                    cancel: function() {
                        // called when user cancels taking a picture
                    },
                    error: function(error) {
                        // called when there's an error
                        var a = Titanium.UI.createAlertDialog({
                            title: 'Camera'
                        });
                        if (error.code == Titanium.Media.NO_CAMERA) {
                            a.setMessage('Please run this test on device');
                        } else {
                            a.setMessage('Unexpected error: ' + error.code);
                        }
                        a.show();
                    },
                    saveToPhotoGallery: true,
                    allowEditing: true,
                    mediaTypes: [Ti.Media.MEDIA_TYPE_VIDEO, Ti.Media.MEDIA_TYPE_PHOTO]
                });
         
            });
         
            win.open();
            

      3. Run the app on the device: titanium build -p ios -T device
      4. Tap the window to show the camera
      5. Notice the status bar showing over the camera view as in attached screenshot

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code