Hi everyone. Before I start, let me say that this product was built using the classic Titanium code, not Alloy. Here's all the pertinent information.
- Mobile
- Titanium SDK 2.1.4, iOS SDK 6.0
- iOS 7.0.4
- Any iPad or iPhone that can run iOS7
- OSX 10.7.5
- Titanium Studio build: 2.1.2.201208301612
Here's the problem. I have some scrolling tab fields where you swipe back and forth to view different products. On an iPad, the second you put your finger on the screen to scroll sideways, it registers your touch as selecting one of the products. On an iPhone, you can still scroll side to side. Before iOS 7, this worked perfectly on all devices. Since upgrading to iOS 7, it works on iPhones, but not iPads. I have a backup plan in case this isn't an easy fix, but I have a feeling it will be an easy fix. Here's a sample of the code.
var scrollView = Titanium.UI.createScrollView({ //contentWidth:1610, //contentHeight:240, contentWidth:'auto', contentHeight:'auto', top:170, height:158, width:690, //borderRadius:10, backgroundColor:'#ffffff' }); scrollView.addEventListener('scroll', function(e) { Ti.API.info('x ' + e.x + ' y ' + e.y); if (e.x > 50) { carsLeftArrow.show(); } else { carsLeftArrow.hide(); } if (e.x < 750) { carsRightArrow.show(); } else { carsRightArrow.hide(); } }); win.add(scrollView); var view1 = Ti.UI.createView({ backgroundImage:'../images/product1.jpg', //borderRadius:20,borderWidth:1,borderColor:'#336699', width:211, height:158, left:10, }); scrollView.add(view1); view1.addEventListener('click',function(e) { var win = Titanium.UI.createWindow({ url:'../products/product1.js', title:'product1', }); Titanium.UI.currentTab.open(win,{animated:true}); }); var view2 = Ti.UI.createView({ backgroundImage:'../images/product2.jpg', //borderRadius:20,borderWidth:1,borderColor:'#336699', width:211, height:158, left:221, }); scrollView.add(view2); view2.addEventListener('click',function(e) { var win = Titanium.UI.createWindow({ url:'../products/product2.js', title:'product2', }); Titanium.UI.currentTab.open(win,{animated:true}); }); var view3 = Ti.UI.createView({ backgroundImage:'../images/product3.jpg', //borderRadius:20,borderWidth:1,borderColor:'#336699', width:211, height:158, left:432 }); scrollView.add(view3); view3.addEventListener('click',function(e) { var win = Titanium.UI.createWindow({ url:'../products/product3.js', title:'product3', }); Titanium.UI.currentTab.open(win,{animated:true}); }); var view4 = Ti.UI.createView({ backgroundImage:'../images/product4.jpg', //borderRadius:20,borderWidth:1,borderColor:'#336699', width:211, height:158, left:643 }); scrollView.add(view4); view4.addEventListener('click',function(e) { var win = Titanium.UI.createWindow({ url:'../products/product4.js', title:'product4', }); Titanium.UI.currentTab.open(win,{animated:true}); }); var view5 = Ti.UI.createView({ backgroundImage:'../images/product5.jpg', //borderRadius:20,borderWidth:1,borderColor:'#336699', width:211, height:158, left:854 }); scrollView.add(view5); view5.addEventListener('click',function(e) { var win = Titanium.UI.createWindow({ url:'../products/product5.js', title:'product5', }); Titanium.UI.currentTab.open(win,{animated:true}); }); var view6 = Ti.UI.createView({ backgroundImage:'../images/product6.jpg', //borderRadius:20,borderWidth:1,borderColor:'#336699', width:211, height:158, left:1065 }); scrollView.add(view6); view6.addEventListener('click',function(e) { var win = Titanium.UI.createWindow({ url:'../products/product6.js', title:'product6', }); Titanium.UI.currentTab.open(win,{animated:true}); }); var view7 = Ti.UI.createView({ backgroundImage:'../images/product7.jpg', //borderRadius:20,borderWidth:1,borderColor:'#336699', width:211, height:158, left:1276 }); scrollView.add(view7); view7.addEventListener('click',function(e) { var win = Titanium.UI.createWindow({ url:'../products/product7.js', title:'product7', }); Titanium.UI.currentTab.open(win,{animated:true}); });Would updating Titanium or Xcode solve this problem? I'm always hesitant to upgrade because I'm worried I'll have to change a bunch of code, but I will if I have to. Any suggestions you guys have would be greatly appreciated. Thanks