Javascript 视图没有反应

Javascript 视图没有反应,javascript,events,titanium,Javascript,Events,Titanium,我尝试用钛制作一个可以旋转和缩放的图像。我设法使其正常工作,但如果图像大于imageView,我希望能够滚动图像。我尝试了几种方法,包括添加eventListeners和使用zIndex将正确的视图显示在前面,但没有任何帮助。我还尝试了bubbleParent函数,没有其他结果。我希望你们中的一些人知道如何实现期望的行为 XML: 还有我的js $.imageScrollView.addEventListener("scroll", function(e) { Ti.API.info("

我尝试用钛制作一个可以旋转和缩放的图像。我设法使其正常工作,但如果图像大于imageView,我希望能够滚动图像。我尝试了几种方法,包括添加eventListeners和使用zIndex将正确的视图显示在前面,但没有任何帮助。我还尝试了bubbleParent函数,没有其他结果。我希望你们中的一些人知道如何实现期望的行为

XML:

还有我的js

$.imageScrollView.addEventListener("scroll", function(e) {
    Ti.API.info("Triggered event");
});

$.pictureView.addEventListener("scroll", function(e) {
    Ti.API.info("Triggered event");
});

毕竟,我最终通过使用以下模块实现了这一点:。如果您在导入/使用它时遇到任何问题,请参阅我的。

尝试使用:Ti.UI.createScrollableView
"#imageScrollView": {
    top: "0",
    left: "0",
    height: "120",
    width: "47%",
    showHorizontalScrollIndicator: "true",
    showVerticalScrollIndicator: "true",
    maxZoomScale: "5",
    minZoomScale: "1",
    backgroundColor: "white",
    scrollingEnabled: "true",
    borderWidth: "1",
    zIndex: "1050"
}
"#pictureView": {
    top: "0",
    left: "0",
    height: "100%",
    width: "100%",
    bubbleParent: true
}
"#picture": {
    top: "0",
    left: "0",
    height: "100%",
    width: "100%",
    borderWidth: "3",
    borderColor: "red",
    bubbleParent: true

}
$.imageScrollView.addEventListener("scroll", function(e) {
    Ti.API.info("Triggered event");
});

$.pictureView.addEventListener("scroll", function(e) {
    Ti.API.info("Triggered event");
});