标签: ios7 uicollectionview autolayout
我有一个UICollectionViewCell子类。我写了一个updateConstraints方法,因为我之前做了一百次。由于某些原因,当细胞出列时从未调用过。我必须在将其出列后向[cell setNeedsUpdateConstraints]添加一个手动调用。
updateConstraints
[cell setNeedsUpdateConstraints]
知道会发生什么事吗?
答案 0 :(得分:15)
实施此方法并返回YES。这可能会有所帮助。
+ (BOOL)requiresConstraintBasedLayout
详情:
https://stackoverflow.com/a/23616469/1300262