Reputation: 1783
I designed UICollectionViewCell
in storyboard .Consists 2 elements UILabel, UIImageView.
for UILabel i given constrains leading=0, trailing=0, bottom=0, height=100
Edit: when i observed in interface inspector, label is not attached to view on collectionView:
Upvotes: 2
Views: 181
Reputation: 1783
I solved issue by adding these lines in cellForItemAtIndexPath
[cell setNeedsLayout];
[cell layoutIfNeeded];
Upvotes: 1