如何在UICollectionViewLayoutAttributes中更改anchorPoint以进行转换?

时间:2015-02-11 15:15:18

标签: ios uicollectionview uicollectionviewlayout catransform3d anchorpoint

我正在使用UICollectionViewLayoutAttributes将变换应用到我的一个单元格中。

我想申请的转换是

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

包含数字dxdyrxry

问题是这个表达式适用于不是我单元格中心的anchorPoint。似乎默认anchorPoint是中间的。所以,我想指定attributes anchorPoint

有办法吗?


PS:除了属性之外,我对转换我的细胞没有多少控制权。实际上,此变换应用于方法- (UICollectionViewLayoutAttributes*)initialLayoutAttributesForAppearingItemAtIndexPath:(NSIndexPath *)itemIndexPath

0 个答案:

没有答案
相关问题