我在uicollectionview中选择单元格时更改了布局,并将自定义动画添加到了集合视图图层
目前我正在使用此代码:
[self.collectionView performBatchUpdates:^{
CATransition *transition = [CATransition animation];
transition.duration = 0.5f;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionMoveIn;
[self.collectionView.layer addAnimation:transition forKey:nil];
[self.collectionView setCollectionViewLayout:self.horizontalPagingLayout animated:NO];
self.galleryInHorizontalScrollMode = YES;
[self.collectionView setPagingEnabled:YES];
} completion:^(BOOL finished) {
[self reloadData];
}];
我想更改动画样式(transition.type),以便所选单元格“增长”(或收缩)到collectionview布局中定义的最终单元格大小
如何做到这一点?
我按照建议here尝试了解决方案,但看起来很差