Reputation: 4159
I have 2 table view, with the same number of cells. Could you please point me the correct way, that I could implement simultaneous scrolling. I mean, when I scroll through one table, the other one is scrolling the same time. Thanks.
Upvotes: 0
Views: 771
Reputation: 10393
As uitable view is derived from uiscrollview you can get the scroll amounts in the delegate method
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
You can get content offset of the scrollview which is being scrolled and assign that to the other tableview.
In this method you should be able to access both tableviews.
The property you need to check is contentOffset
.
firsttableview.contentOffset = scrollview.contentOffset
Upvotes: 1