ios scrollview正在滾動時 中止滾動 代碼實現

CGPoint offset = self.collectionView.contentOffset;
 (self.collectionView.contentOffset.y > 0) ? offset.y-- : offset.y++; 
[self.collectionView setContentOffset:offset animated:NO];

關鍵是x或者y的值必需要改變了spa

相關文章
相關標籤/搜索