I've a problem with the ScrollViews in Titanium in an iOS-app: I added two ScrollViews to my basic-window so that they are shown on start up. Both ScrollViews contain an ImageView and have exactly the same size. Thanks to the ScrollView you can scroll through the images given with the ImageViews. What I now want is the following:
When I scroll in the first ScrollView I want that the second ScrollView scrolls exactly the same way; I'm scrolling in one view and the content of the second ScrollView changes the same way too.
To solve this problem I tried the following:
firstScrollView.addEventListener('scroll', function(e) {
secondScrollView.scrollTo(e.x, e.y);
});
When the first ScrollView fires the "Scroll"-event I tell the second ScrollView the position of it. In principle this works fine, but the animation of the second ScrollView is always delayed and I need this animation simultaneously to the first ScrollView.
Am I doing something wrong? Or is there another method to solve this problem?
Thanks and best regards, Thomas