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.
Hi, Can you please tell me which version of your iphone device, as I can't reproduce your problem wiht iphone 4. Regards, Shuo
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.
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.
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.
I'm able to reproduce on an iPhone 6 with iOS 8.1.1, Ti 3.4.2.GA and iOS SDK 8.1
Test Code
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
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.
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.
When will you plan to release SDK 3.6.0? this bug still exists in V3.5.1.
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"
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.
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