objective c - Making 1 UITableView scroll to the same row as another UITableView -


There are 2 UITableViews on my screen.

As the user scrolls 1 ... I need it to scroll the other 1 up to the same line.

I think I need to find a "tableViewDidScroll" method ... and somehow the "Zorov displayed" value is detected ... and then the second table view "

Help!

(Edit: Both tables will always have the same number of rows)

If you have the same height of rows in your tables, you can use the UIScrollView methods to set the content directly.

copy Fund table scrollwidthscroll: Apply for both tables. To set the content offset of other table for match to set you should track while setting offset to avoid unnecessary calls.

ScrollView: (void) scrollViewDidScroll: (UIScrollView *) scrollView {if (scrollView! = Table backtrack) {if scrollview == table1} {tableBeingScrolled = Table2; Table2.contentOffset = table1.contentOffset; table backs Scroll = null; } If (scrollView == Table 2) {tableBeingScrolled = table1; Table1.contentOffset = table2.contentOffset; Table backscroll = zero; If different rows are in tables, then you can use the same technique, but to determine which offset should be assigned, more calculation will be required.

/ html>

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -