2017-10-11 38 views
0

ImageView的旋轉不是的CollectionView細胞內正常工作內正常工作,但的CollectionView的外面工作good.It版本拉伸&非常薄得像它集合視圖內工作ImageView的旋轉不是的CollectionView細胞

這裏是我的代碼&屏幕我得到.. 對於集合視圖

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

細胞0 enter image description here 單元1內的ImageViewenter image description here cell 2 enter image description here

集合視圖之外。

enter image description here

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

我不知道爲什麼它不是集合視圖內正常工作,幫我

+1

如何將圖像視圖添加到單元格?可能是自動佈局擠壓圖像。此外,圖像視圖的contentMode是什麼,如果將其設置爲居中,可能會解決問題? –

+0

UIImageView * imgView =(UIImageView *)[cell viewWithTag:55];內容模式是比例填充 –

回答

1

檢查圖像大小。

更改內容模式