开发者

Titanium.Media.showCamera with overlay, pass through events

I am writing an iOS application that utilizes the camera. I want an image (and ultimately a control element or two) overlayed over the camera picture.

This already works. However the overlay prevents the default control elements for Flash, HDR and camera selection from receiving touch events.

Below is my code. Is there a way to make m开发者_如何学CyOverlay pass through or ignore events?

var overlayImage = Titanium.UI.createImageView({
    width: 100,
    height: 100,
    backgroundImage: 'img/picture.png'
});
var myOverlay = Titanium.UI.createView();
myOverlay.add(overlayImage);

Titanium.Media.showCamera({
    success: successMethod,
    error: errorMethod,
    cancel: function(e) {},
    overlay: myOverlay,
    saveToPhotoGallery: true,
    allowEditing: false,
    mediaTypes: ['public.image']
});


You can try var myOverlay = Titanium.UI.createView({touchEnabled: false}); and it should pass events according to the Appcelerator docs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜