2

我正在使用UICollectionViewLayoutAttributes对我的一个单元格进行转换。

我想应用的转换是

    CATransform3D transform = CATransform3DMakeTranslation(dx, dy, 0);
    attributes.transform3D = CATransform3DScale(transform, rx, ry, 1);

用数字dx,dy和.rxry

问题是这个表达式对于anchorPoint不是我的单元格中心的是可以的。好像默认anchorPoint是中间的。所以,我想指定我attributesanchorPoint.

有没有办法做到这一点?


PS:除了属性之外,我对转换我的单元格没有太多控制权。实际上,这个变换被应用在方法中- (UICollectionViewLayoutAttributes*)initialLayoutAttributesForAppearingItemAtIndexPath:(NSIndexPath *)itemIndexPath

4

0 回答 0