CGPoint offset = self.collectionView.contentOffset; (self.collectionView.contentOffset.y > 0) ? offset.y-- : offset.y++; [self.collectionView setContentOffset:offset animated:NO];
關鍵是x或者y的值必需要改變了spa