UICollectionView insertItem -> adjust animation time?

前端 未结 3 1588
滥情空心
滥情空心 2020-12-29 12:28

So, I have a UICollectionView where I insert new items.

I used the most of the suggestions from the Collection View Programming Guide - section \"Making Insertion an

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-29 13:27

    You can change any animation speed with CALayer. So for UICollectionView this looks like the following:

    [self.collectionView.viewForBaselineLayout.layer setSpeed:0.1f];
    

    And you can change back the original speed:

    [self.collectionView.viewForBaselineLayout.layer setSpeed:1.0f];
    

    For this to work you may need to import QuartzCore:

    #import 
    

提交回复
热议问题