Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17627] iOS: Fix fullscreen transform for Camera

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-12-17T22:07:51.000+0000
Affected Version/sRelease 3.3.0
Fix Version/sRelease 4.0.0
ComponentsiOS
LabelsTCSupport, ios, overlay, rotate, showCamera, transform
ReporterRay Woo
AssigneeVishal Duggal
Created2014-07-07T02:53:15.000+0000
Updated2015-07-10T11:53:04.000+0000

Description

Problem Description

A black stripe on the bottom when using showCamera with a parameter of scale 1 and overlay rotating 90 degree. The code will show a black Stripe on the Bottom of the Screen and the app is in Landscape mode. Use a 2d matrix to transform the live view of the camera by scaling it 1 to 1.x or whatever scale you want to fill the screen. for me the camera previews full screen at scale 1.75.

Steps to reproduce

1. Create new mobile project (classic titanium) 2. Copy this code into app.js
var container ={};
var overlayTransform = Ti.UI.create2DMatrix().rotate(90);
container.overlay = Titanium.UI.createView({transform:overlayTransform} );
var cameraTransform = Ti.UI.create2DMatrix();
cameraTransform = cameraTransform.scale(1);

Titanium.Media.showCamera(
{
    success:function(event)
    {

    },
    cancel:function()
    {
    },
    error:function(error)
    {
    },
    autohide:false,
    overlay:container.overlay,
    showControls:false,
    transform:cameraTransform,
});
3. Run it in device.

Attachments

FileDateSize
IMG_0010.PNG2014-07-07T02:53:16.000+00001072596

Comments

  1. Shuo Liang 2014-07-07

    Hi, Can you please tell me which version of your iphone device, as I can't reproduce your problem wiht iphone 4. Regards, Shuo
  2. Ray Woo 2014-07-07

    Hi I run the test app on the following two devices, both have this problem. Please pay attention to the bottom of the screen. 1, iPod touch MC540, iOS 6.1.6 2, iPhone 5S MF402, iOS 7.1.2 There's another iPhone 4S device with iOS 7.1.x which also has similar problem.
  3. Michael Gangolf 2014-09-05

    similar problem on an iPhone5 (iOS7): !http://www.migaweb.de/foto1.jpg! !http://www.migaweb.de/foto2.jpg! !http://www.migaweb.de/foto3.jpg! it looks like the black square is the space that it normally used for the buttons and if you set show controls to false it will move the image and the black border stays.
  4. Urban Gerber 2014-11-28

    Same problem on iPad 2 and 4 when showControls = false and using pinch gesture for zooming in or out. SDK 3.4.0. iOS 8.1.1 Please consider fixing this soon, as we have customer complaints and no remedy.
  5. Shannon Hicks 2014-12-05

    I'm able to reproduce on an iPhone 6 with iOS 8.1.1, Ti 3.4.2.GA and iOS SDK 8.1
  6. Vishal Duggal 2014-12-12

    Test Code
       var container ={};
       var overlayTransform = Ti.UI.create2DMatrix().rotate(90);
       container.overlay = Titanium.UI.createView({transform:overlayTransform} );
       
       var win = Ti.UI.createWindow({
           backgroundColor:'white',
           orientationModes:[1,2,3,4]
       });
       
       
       var label = Ti.UI.createLabel({text:'HELLO'});
       win.add(label);
       win.open();
       
       win.addEventListener('click',function(){
           Titanium.Media.showCamera(
           {
               success:function(event)
               {
            
               },
               cancel:function()
               {
               },
               error:function(error)
               {
               },
               autohide:false,
               overlay:container.overlay,
               showControls:false
           });
       });
       
  7. Vishal Duggal 2014-12-12

    Pull pending master - https://github.com/appcelerator/titanium_mobile/pull/6477 3_5_X - https://github.com/appcelerator/titanium_mobile/pull/6478 reverting 3_5_X: https://github.com/appcelerator/titanium_mobile/pull/6499
  8. Vishal Duggal 2014-12-12

    If you want a full screen transform then do not set the transform property in the showCamera args and provide a overlay. If you specify a transform then that is the transform applied to the Camera Preview.
  9. Ewan Harris 2015-01-20

    Verified fix on: Mac OSX 10.10.1 Appcelerator Studio, build: 3.4.1.201410281743 Titanium SDK build: 3.6.0.v20150120095514 Titanium CLI, build: 3.4.1 Alloy: 1.5.1 Xcode 6.1.1 iPhone 6 (8.2b4) Built to device, when using the code attached there is no longer a black bar shown on the screen. Closing ticket.
  10. Ray Woo 2015-03-20

    When will you plan to release SDK 3.6.0? this bug still exists in V3.5.1.
  11. Shannon Hicks 2015-03-20

    It's been renamed to SDK 4.0.0 Also, the PR is simple enough, you could just drop the new MediaModule.m file right into a custom SDK and you're golden. I would recommend naming it something else, like "3.5.1.PR"
  12. Ray Woo 2015-03-23

    Hi, Shannon, I download SDK 4.1.0, copy the MediaModule.m file to SDK 3.5.0, build and run the app on iphone 6 using SDK 3.5.0, but the problem still exists. Would you please tell me what is wrong? thanks.
  13. Dean 2015-07-10

    On SDK 4.1.0, when 'showControls' is set to 'false', while zooming, this issue still occurs: Black bar is displayed on the side, and viewing area is reduced. It seams that background for not showing controls is still active and displayed

JSON Source