ios - Set anchor point in UICollectionViewLayoutAttributes -


i want perform transform animation in uicollectionviewlayout. achieved can't find way set anchorpoint of uicollectionviewlayoutattributes. want perform door opening , closing animation while collection view item inserted

-(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; } 

there doesn't seem anchorpoint attribute in uicollectionviewlayoutattributes, you'll have subclass it, add property anchorpoint , use applylayoutattributes on uicollectionviewcell set anchorpoint value on cell.


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -