Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 2 个水平的 uicollectionview。滚动第一个时如何同时滚动第二个集合视图。
AUICollectionView也是 a UIScrollView,因此,它的委托接收所有 UIScrollViewDelegate方法。
UICollectionView
UIScrollView
UIScrollViewDelegate
您应该scrollViewDidScroll:在两个集合视图的代表中实现。在该方法的实现中,您可以根据已经滚动的视图来调整contentOffset其他集合视图的。contentOffset
scrollViewDidScroll:
contentOffset