我在故事板UICollectionViewCell
中设计了.Consists 2元素UILabel,UIImageView。
对于UILabel,我给出了约束leading=0、trailing=0、bottom=0、height=100
我的collectionViewCell
但当我在模拟器里运行时:
编辑:当我在界面检查器中观察到时,标签没有附加到collectionView上的视图:
发布于 2016-07-05 18:17:18
我通过在cellForItemAtIndexPath中添加这些行来解决问题
[cell setNeedsLayout];
[cell layoutIfNeeded];
https://stackoverflow.com/questions/38203408
复制相似问题