UICollectionViewCell Shake

后端 未结 5 814
谎友^
谎友^ 2020-12-13 19:00

I have created a UICollectionView and would like to have all the cells shake like the edit mode of the springboard on the iPhone. I have created my shake code but don\'t kno

5条回答
  •  执念已碎
    2020-12-13 19:36

    Place this line of code at two places:

    [self.collectionView.visibleCells makeObjectsPerformSelector:@selector(startJiggling)];    
    
    1. -(void)collectionView:(UICollectionView *)collectionView didEndDisplayingCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath

    2. -(void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView

提交回复
热议问题