In my app, I have two tableViews side by side. When the user scrolls on, I would like the second one to scroll at the same time, so it looks almost like one table with two different columns. I’m a bit lost on how to go about doing this, any suggestions?
Thanks,
Greg
You’ll want to look into the
UIScrollViewDelegate– say you’ve got two scroll views, A and B.Use the
scrollViewDidScrolldelegate method of scroll view A to get the offset, and then in the same method callsetContentOffseton scroll view B, passing in the value you get from the delegate.It actually shouldn’t be more than 2-3 lines of code once you’ve set-up your delegate methods.