代码之家  ›  专栏  ›  技术社区  ›  Test iOS

ImageView旋转在collectionView单元格内工作不正常

  •  0
  • Test iOS  · 技术社区  · 8 年前

    ImageView旋转在collectionView单元格内工作不正常,但在collectionView之外工作正常。它被拉伸了&像这样非常薄,它在集合视图中工作

    这是我的代码&我得到的屏幕。。 对于集合视图内的imageview

    imgView.transform=CGAffineTransformMakeRotation([dict[@"SomeValue"]longValue]*M_PI/180);
    

    单元格0 enter image description here 单元格1 enter image description here 单元格2 enter image description here

    在集合视图之外。

    enter image description here

    imageView.transform=CGAffineTransformMakeRotation([dict[@"SomeValue"]longValue]*M_PI/180);
    

    我不知道为什么它在集合视图中不能正常工作帮助我

    1 回复  |  直到 8 年前
        1
  •  1
  •   iOSDevp    8 年前

    检查图像大小。

    更改内容模式