Я хочу выполнить анимацию преобразования в UICollectionViewLayout
. Хорошо, что достигается легко, но я не могу найти способ установить anchorPoint
UICollectionViewLayoutAttributes
. Я хочу, чтобы выполнить открытие дверей и закрытия анимации в то время как вид коллекции элемент вставляетсяУстановить опорную точку в UICollectionViewLayoutAttributes
-(UICollectionViewLayoutAttributes *)initialLayoutAttributesForAppearingItemAtIndexPath:(NSIndexPath *)itemIndexPath{
UICollectionViewLayoutAttributes *attributes = [super initialLayoutAttributesForAppearingItemAtIndexPath:itemIndexPath];
attributes.alpha = 1.0;
CGFloat progress = 0.0;
CATransform3D transform = CATransform3DIdentity;
transform.m34 = -1.0/500.0;
CGFloat angle = (1 - progress) * M_PI_2;
transform = CATransform3DRotate(transform, angle, 0, 1, 0 );
UICollectionViewCell *cell = [self.collectionView cellForItemAtIndexPath:itemIndexPath];
cell.hidden = YES;
attributes.transform3D = transform;
return attributes;
}