Hiya
So in my iPhone app i am needing to have 4 images that the user can zoom in and out and position. Each image is placed inside a scrollView to allow panning and zooming automatically. Unfortunately i am getting some odd behaviour when trying these gestures - panning/moving the images around their scrollviews is ok but if i try zooming in on 1 image it effects one of the other images as well (so zooming in on say imagePhoto1 picks up one of the fingers on imagePhoto2 so is unable to zoom, the same for 2 and 3)
Am i doing something wrong or can i not have more than one scrollview with it's gestures at once?
app.js example code below (excuse the messy code!)
var win = Ti.UI.createWindow({ backgroundColor:'black' }); var imageHolder1 = Ti.UI.createScrollView({contentWidth:'auto', contentHeight:'auto', height:180, width:240, top:100, left:264, showVerticalScrollIndicator:false, minZoomScale:1, maxZoomScale:1.9, zoomScale:1.01}); var imagePhoto1 = Ti.UI.createImageView({width:260, height:236, top:0, left:0, image:'img1.png'}); imageHolder1.add(imagePhoto1); var imageHolder2 = Ti.UI.createScrollView({contentWidth:'auto', contentHeight:'auto', height:180, width:240, top:320, left:264, showVerticalScrollIndicator:false, minZoomScale:1, maxZoomScale:1.9, zoomScale:1.01}); var imagePhoto2 = Ti.UI.createImageView({width:260, height:236, top:0, left:0, image:'img2.png'}); imageHolder2.add(imagePhoto2); var imageHolder3 = Ti.UI.createScrollView({contentWidth:'auto', contentHeight:'auto', height:180, width:240, bottom:320, left:264, showVerticalScrollIndicator:false, minZoomScale:1, maxZoomScale:1.9, zoomScale:1.01}); var imagePhoto3 = Ti.UI.createImageView({width:260, height:236, top:0, left:0, image:'img3.png'}); imageHolder3.add(imagePhoto3); var imageHolder4 = Ti.UI.createScrollView({contentWidth:'auto', contentHeight:'auto', height:180, width:240, bottom:100, left:264, showVerticalScrollIndicator:false, minZoomScale:1, maxZoomScale:1.9, zoomScale:1.01}); var imagePhoto4 = Ti.UI.createImageView({width:260, height:236, top:0, left:0, image:'img4.png'}); imageHolder4.add(imagePhoto4); win.add(imageHolder1); win.add(imageHolder2); win.add(imageHolder3); win.add(imageHolder4); win.open();Lauren :)
1 Answer
I am not definitely sure about this but I believe you cannot have more than one scrollview with it's gestures at once.
Your Answer
Think you can help? Login to answer this question!