[TIMOB-10354] iOS: Camera overlay rendering issues
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-08-14T11:15:20.000+0000 |
Affected Version/s | Release 2.1.0, Release 2.1.1 |
Fix Version/s | Sprint 2012-16 API, Release 2.1.2, Release 3.0.0 |
Components | iOS |
Labels | api, qe-port |
Reporter | Nikhil Sharma |
Assignee | Vishal Duggal |
Created | 2012-08-08T14:42:29.000+0000 |
Updated | 2014-04-03T16:42:12.000+0000 |
Description
There is a problem rendering views on a camera overlay. Please find the image attached.
Repo Steps
1. Run the below code in app.js 2. Tap the "Open Button" and it will open the casmera with custom overlay. 3. First time everything looks good. Tap the close button. 4. Again tap the "Open Button" and now you'll see the icon on the shutter button will be moved above the close button.
/*jslint white:true plusplus:true nomen:true vars:true sloppy:true undef:false*/
var win1 = Titanium.UI.createWindow();
var openCameraButton = Titanium.UI.createButton({
title : 'Open Camera',
width : 120,
height : 40
});
win1.add(openCameraButton);
var overlayView = Ti.UI.createView({
backgroundColor : 'transparent'
});
var closeButton = Ti.UI.createButton({
title : 'Close',
width : 60,
height : 40,
bottom : 0,
left : 0
});
closeButton.addEventListener('click', function() {
Ti.Media.hideCamera();
});
var shutterButton = Ti.UI.createButton({
touchEnabled : true,
width : 100,
height : 40,
bottom : 5
});
var shutterButtonIcon = Ti.UI.createImageView({
image : 'ShutterIcon.png',
width : 26,
height : 21
});
shutterButton.add(shutterButtonIcon);
overlayView.add(closeButton);
overlayView.add(shutterButton);
openCameraButton.addEventListener('click', function() {
Ti.Media.showCamera({
success : function(event) {
Ti.API.info('Camera success event received.');
},
cancel : function(event) {
Ti.API.info('Camera cancel event received.', 2);
},
error : function(error) {
Ti.API.info('Camera error event received.', 2);
},
overlay : overlayView,
transform : Ti.UI.create2DMatrix(),
allowEditing : false,
saveToPhotoGallery : false,
mediaTypes : Ti.Media.MEDIA_TYPE_PHOTO,
showControls : false,
autohide : false,
animated : true
});
});
win1.open();
Attachments
File | Date | Size |
---|---|---|
ShutterIcon.png | 2012-08-08T14:42:29.000+0000 | 3629 |
ShutterIcon 2.png | 2012-08-08T16:37:29.000+0000 | 3555 |
Pull pending https://github.com/appcelerator/titanium_mobile/pull/2712
Verified fixed with Titanium Studio, build: 2.1.1.201207271312 Titanium SDK, build: 2.2.0.v20120810080115 Device: iPhone 4s (5.1.1)
Reopening to adjust estimates
Closing after adjusting estimates
Reopening to update Fixversion label to Release 2.1.2