Posts

Showing posts with the label uiscrollview

Connect Two ScrollView’s Together with different Content Offset Values

Connect Two ScrollView’s Together with different Content Offset Values To Scroll 2 different scrollView together, Many questions have been already answered regarding using the scrollViewDidScroll Method and passing the content offset of one scrollview to other. But My Question here is a bit different, Let’s say I have 2 ScrollView A and B both with horizontal scrolling only. When the view loads ScrollView A has contentOffSet say (x,y) and B scrollview’s content offset : (m,n). As per my understanding content Offset is the new (x,y) value while scrolling. Now I can’t pass the content Offset value of A to B here to scroll them together as they loads at different points due to content requirement.I need the exact x points displaced while scrolling in A, then may be pass it to B. I have also tried getting the velocity from pangesture of A and passing it to B, which doesn’t work smoothly. How can I achieve a smooth scrolling for both views ? Just a question why d...