javascript - 带有叠加层的 Titanium.Media.showCamera,通过事件

标签 javascript iphone view titanium appcelerator

我正在编写一个使用摄像头的 iOS 应用程序。我想要一张图像(最终是一两个控制元素)覆盖在相机图片上。

这已经有效了。但是,叠加层会阻止 Flash、HDR 和相机选择的默认控制元素接收触摸事件。

下面是我的代码。有没有办法让myOverlay通过或忽略事件?

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']
});

最佳答案

您可以尝试 var myOverlay = Titanium.UI.createView({touchEnabled: false});,它应该根据 Appcelerator 文档传递事件。

关于javascript - 带有叠加层的 Titanium.Media.showCamera,通过事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5832038/

相关文章:

iphone - 尝试使用对象初始化 NSArray 时出错?

iphone - 从 NSDictionary 中检索值

MySQL:表与 View 与例程

javascript - 响应式侧滚动博客页面问题

javascript - 如何保护 JavaScript/Ajax 客户端 [apigee] 中使用的 API 的安全?

iphone - 我无法通过按回车键隐藏键盘

android - 如何从 Android 中的 Activity 访问自定义适配器内 fragment 的 UI 元素

android - 查看 : chain two rotation with different pivots

javascript - 在 HTML 中使用 JavaScript 在文本框中输入值

javascript - Angular : Getting the scope that an element was compiled with