///滚动到指定item
    [self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:indexPath.item inSection:0] atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally animated:YES];

 

 

UICollectionView 自动将被选中的cell滚动到正中

http://blog.sina.com.cn/s/blog_8070e98f0102xg0f.html

posted on 2020-10-15 11:47  懂事长qingzZ  阅读(227)  评论(0编辑  收藏  举报