I have a horizontal UICollectionView
, and each cell holds a UIImageView
. When I position the UIImageView inside the cell:
the storyboard looks like this(notice the UIImageView
takes the entire space of the UICollectionViewCell
with an identifier postInnerCell)
I think I have set the constraint using autoLayout correctly, with each side of the UIImageView
pined to the margins of the UICollectionViewCell
. Like this:
When I ran the simulator, however, it looks like this:
The image does not fill up the entire space of the collectionViewCell
(with the gray background color). The the content mode of the UIImageView
is set to be aspect fill in the interface builder.
**Note that the entire UICollectionView
is a cell of the tableView(Basically, what I try to accomplish is each row of the tableView is a horizontal slider). I'm not sure that's the problem. Anyone have any idea about why such a issue occurs. **