Feature
Expose two new events on a scroll view: "dragStart" and "dragEnd". These would occur with scrollViewWillBeginDragging and scrollViewDidEndDragging.
Sample Code
The following code would use these events.
var window = Ti.UI.createWindow({
backgroundColor:'#fff'
});
var scrollView = Ti.UI.createScrollView({
width: 320, height: 480,
contentWidth: 2000
});
scrollView.addEventListener('dragStart', function(e) {
Ti.API.info('drag start!');
window.backgroundColor = '#aaa';
});
scrollView.addEventListener('dragEnd', function(e) {
Ti.API.info('drag end! Will decelerate? ' + (e.decelerate ? 'Yes' : 'No'));
window.backgroundColor = '#fff';
});
scrollView.add(Ti.UI.createLabel({
text: 'Swipe Me',
width: 2000, height: 50,
textAlign: 'left'
}));
scrollView.add(Ti.UI.createLabel({
text: '...and dragStart and dragEnd should fire!',
width: 2000, height: 50,
textAlign: 'right'
}));
window.add(scrollView);
window.open();
Associated Helpdesk Ticket
http://appc.me/c/APP-413136
Pull Request
https://github.com/appcelerator/titanium_mobile/pull/150pull pending #351
Verified fixed with : Mobile sdk-2.2.0.v20120810080115 Titanium Studio, build: 2.1.1.201207271312 Device: Ipad 5.1