Ios 集合视图->;具有反弹/弹簧效果的单个单元动画

Ios 集合视图->;具有反弹/弹簧效果的单个单元动画,ios,animation,uicollectionview,collectionview,Ios,Animation,Uicollectionview,Collectionview,我正在尝试使用反弹效果为单个集合视图单元(插入单元时,仅使用动画的前N个单元一次)设置动画,并想知道下面的函数是否是放置动画的正确函数?下面的代码移动单元格,这是我想要的,但我也希望在最后有一个弹簧效果 - (UICollectionViewLayoutAttributes*)initialLayoutAttributesForAppearingItemAtIndexPath:(NSIndexPath *)itemIndexPath { UICollectionViewLayoutAtt

我正在尝试使用反弹效果为单个集合视图单元(插入单元时,仅使用动画的前N个单元一次)设置动画,并想知道下面的函数是否是放置动画的正确函数?下面的代码移动单元格,这是我想要的,但我也希望在最后有一个弹簧效果

- (UICollectionViewLayoutAttributes*)initialLayoutAttributesForAppearingItemAtIndexPath:(NSIndexPath *)itemIndexPath {
    UICollectionViewLayoutAttributes *attributes = [super initialLayoutAttributesForAppearingItemAtIndexPath:itemIndexPath];
    attributes.transform =  CGAffineTransformMakeTranslation(0, 20.5);
    return attributes;
}

看看POP动画引擎,它可能会提供您正在寻找的动画,然后提供一些。我不知道如何将弹簧行为附加到单元。无论如何,谢谢你的链接。你有没有尝试将动画附加到细胞层?我没有亲自尝试过,但动画框架(如上面的链接)就是这样工作的。Tim,我创建了一个自定义流布局,流布局属性,并覆盖单元格中的ApplyLayoutAttribute,它工作了。谢谢你的建议。