方法scrollToItemAtIndexPath失效是由于开启了pagingEnabled属性导致的,因此可以像下面这样处理:
_collectionView.pagingEnabled = NO;
[_collectionView scrollToItemAtIndexPath:indexPath atScrollPosition:position animated:animated];
_collectionView.pagingEnabled = YES;
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: