我正在使用UICollectionViewLayoutAttributes
对我的一个单元格进行转换。
我想应用的转换是
CATransform3D transform = CATransform3DMakeTranslation(dx, dy, 0);
attributes.transform3D = CATransform3DScale(transform, rx, ry, 1);
用数字dx
,dy
和.rx
ry
问题是这个表达式对于anchorPoint
不是我的单元格中心的是可以的。好像默认anchorPoint
是中间的。所以,我想指定我attributes
的anchorPoint
.
有没有办法做到这一点?
PS:除了属性之外,我对转换我的单元格没有太多控制权。实际上,这个变换被应用在方法中- (UICollectionViewLayoutAttributes*)initialLayoutAttributesForAppearingItemAtIndexPath:(NSIndexPath *)itemIndexPath