I'm making a very simple collection view
. I want an image
in each cell
that make half width of the cell. I modify the frame of the cell with
(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
I have only 4 constraints on my image (I made them on the storyboard):
The things is it looks fine on the storyboard, but don't work in real. Here an image :
What I'm doing wrong ?
Thank you
尝试在UIImageView上设置“缩放为填充模式”
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.