Problem description
When creating a Picker inside a ScrollView in iOS 4.3, the picker does not scroll, but the ScrollView does instead. The same code works with iOS 5+
Steps to reproduce
1. create an app with the code below
2. run the app with iOS 4.3
2. scroll the picker
3. the picker does not scroll, but the scrollview does, instead
var win = Titanium.UI.createWindow({
backgroundColor:'#fff'
});
var scrollView = Ti.UI.createScrollView({
contentWidth: 'auto',
contentHeight: 'auto',
showVerticalScrollIndicator: true,
showHorizontalScrollIndicator: true
});
var view = Ti.UI.createView({
backgroundColor:'#336699',
height: 2000,
width: 250
});
var picker = Ti.UI.createPicker({
top: 0
});
var data = [];
data[0]=Ti.UI.createPickerRow({title:'Bananas'});
data[1]=Ti.UI.createPickerRow({title:'Strawberries'});
data[2]=Ti.UI.createPickerRow({title:'Mangos'});
data[3]=Ti.UI.createPickerRow({title:'Grapes'});
picker.add(data);
picker.selectionIndicator = true;
view.add(picker);
scrollView.add(view);
win.add(scrollView);
win.open();
Expected result
Picker should work and the view should not scroll
Additional notes
Customer ticket:
http://support-admin.appcelerator.com/display/17325
This is not a bug in Titanium, this is the cause of placing two scrolling components together. The reason it works differently is due to the iOS version and how the framework works internally.