If the rows in your tables are the same height, you can use the UIScrollView methods to set the contentOffset directly.
Implement the delegate method scrollViewDidScroll: for both tables. Whichever table made the call, set the contentOffset of the other table to match. You should track when you are setting the offset to avoid unnecessary calls.
// table1, table2, tableBeingScrolled all members
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
if ( scrollView != tableBeingScrolled ) {
if ( scrollView == table1 ) {
tableBeingScrolled = table2;
table2.contentOffset = table1.contentOffset;
tableBeingScrolled = nil;
}
if ( scrollView == table2 ) {
tableBeingScrolled = table1;
table1.contentOffset = table2.contentOffset;
tableBeingScrolled = nil;
}
}
}
If the tables have different row heights, you could use the same technique but would need more calculations to figure out what offset to assign.