Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15203] iOS7: showCamera shows status bar over camera view

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-10-17T19:33:14.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 21, 2013 Sprint 21 API, Release 3.2.0
ComponentsiOS
Labelsios7, module_media, qe-testadded, showcamera
ReporterFokke Zandbergen
AssigneeVishal Duggal
Created2013-09-16T07:39:14.000+0000
Updated2013-10-18T11:01:01.000+0000

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

Create a new app: titanium create -p ios -n testCamera --id test.camera -d .

For app.js use the following, [taken from the docs](http://docs.appcelerator.com/titanium/latest/#!/guide/Camera_and_Photo_Gallery_APIs-section-29004913_CameraandPhotoGalleryAPIs-Camera):

    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();
    

Run the app on the device: titanium build -p ios -T device

Tap the window to show the camera

Notice the status bar showing over the camera view as in attached screenshot

Attachments

FileDateSize
foto.PNG2013-09-16T07:39:14.000+00001008258

Comments

  1. Vishal Duggal 2013-10-14

    Pull pending against master https://github.com/appcelerator/titanium_mobile/pull/4785
  2. Paras Mishra 2013-10-18

    Status bar is not shown any more in camera view. Verified fixed on: Device : iPhone 5 , iOS version : 7.0 SDK: 3.2.0.v20131016191202 CLI version : 3.2.0 OS : MAC OSX 10.8.4 Alloy : 1.2.2 Appcelerator Studio, build: 3.2.0.201310170829 XCode : 5

JSON Source