When user is editing a photo after taking a picture with the camera, if you have allowEditing set to true you need to have the overlay pass through any touch events to the Camera/Photo editor so the user can "Move & Scale" the image. However, when the touchEnabled property of UIView is set to false on a Camera overlay, the overlay blocks the user from "Move & Scale".
We discovered this while upgrading our app to 1.7.3 and support for iOS 5. It worked fine using the same build on iOS 4.
I have attached just the code to reproduce the issue. No errors/logs show up on the Console log.
Ti.UI.setBackgroundColor('#000');
// show camera
var showCamera = function () {
// create our overlay and box
var box = Ti.UI.createImageView({
touchEnabled: false,
top: 54, width: 320, height: 320,
borderWidth: 1, borderColor: '#fff', backgroundColor: 'transparent'
}), overlay = Ti.UI.createView({
touchEnabled: false, backgroundColor: 'transparent'
}), transform = Ti.UI.create2DMatrix();
overlay.add(box);
// show camera
Titanium.Media.showCamera({
overlay : overlay,
transform : transform.scale(1),
animated : false,
autohide : true,
showControls : true,
allowEditing : true,
mediaTypes : Ti.Media.MEDIA_TYPE_PHOTO,
success : function () {},
cancel : function () {},
error : function () {}
});
};
// main window
var win = Ti.UI.createWindow(), cameraBtn = Ti.UI.createButton({
title: 'Camera', top: 20, width: 200, height: 35
});
win.add(cameraBtn);
// events
cameraBtn.addEventListener('click', showCamera);
// open main window
win.open();
Simpler app.js code to reproduce the issue.
Haitham Please note the changes I have made to this ticket to allow it to be escalated. Would you please check the wording to ensure that I have not changed your intended meaning? Would you test this for the latest release 1.8.0.1, to confirm this has not been resolved already? Once you have provided this information, I will escalate it to our engineering team. Cheers
Closing due to inactivity. If this issue still exists, please raise a new ticket, including all the information in the [JIRA Ticket Checklist](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist) to ensure that we can escalate it quickly. Read [How to Submit a Bug Report](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report) if you have not read it before, and always start a ticket using the [JIRA Ticket Template](https://wiki.appcelerator.org/display/guides/JIRA+Ticket+Template). Thanks in advance
I'm having this issue as well with SDK 2.1.2GA . If an overlay is present allowEditing fails to work because click events are not passing through the overlay even with touchEnabled : false just as in the example above.