Dave, Try the following:
- (void) scrollViewDidScroll:(LTWScrollView*) theScrollView { if (theScrollView.tag == kScrollViewA) { [self.scrollViewB setContentOffset:theScrollView.contentOffset animated:NO]; [self.scrollViewC setContentOffset:theScrollView.contentOffset animated:NO]; } else if (theScrollView.tag == kScrollViewB) { [self.scrollViewA setContentOffset:theScrollView.contentOffset animated:NO]; [self.scrollViewC setContentOffset:theScrollView.contentOffset animated:NO]; } else if (theScrollView.tag == kScrollViewC) { [self.scrollViewA setContentOffset:theScrollView.contentOffset animated:NO]; [self.scrollViewB setContentOffset:theScrollView.contentOffset animated:NO]; } } It may help. Damian On Oct 9, 2013, at 8:44 AM, Dave <d...@looktowindward.com> wrote: > Hi, > > I've got a number of scroll views (A, B and C) I'm trying to keep in sync > with each other, e.g. if the user scrolls A then I want B and C to scroll in > sync with it. I've got this working by adding code in the scrollViewDidScroll > method that passes the contentOffset onto the other two scroll views. > > This works ok, but it is judders a bit and flickers when scrolling quickly. > > This is the code: > > - (void) scrollViewDidScroll:(LTWScrollView*) theScrollView > { > if (theScrollView.tag == kScrollViewA) > { > self.scrollViewB.contentOffset = theScrollView.contentOffset; > self.scrollViewC.contentOffset = theScrollView.contentOffset; > } > > else if (theScrollView.tag == kScrollViewB) > { > self.scrollViewA.contentOffset = theScrollView.contentOffset; > self.scrollViewC.contentOffset = theScrollView.contentOffset; > } > else if (theScrollView.tag == kScrollViewC) > { > self.scrollViewA.contentOffset = theScrollView.contentOffset; > self.scrollViewB.contentOffset = theScrollView.contentOffset; > } > } > > I've tried a few things, but nothing seem to make a difference. > > Any ideas anyone? > > Thanks a lot > Dave > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/damiancarrillo%40me.com > > This email sent to damiancarri...@me.com
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com