UICollectionViewCell在出列时不会自动调用updateConstraints?

Bob*_*ryn 6 autolayout uicollectionview ios7

我有一个UICollectionViewCell子类.我写了一个updateConstraints方法,因为我之前做了一百次.由于某些原因,当细胞出列时从未调用过.我必须[cell setNeedsUpdateConstraints]在出列后添加一个手动调用.

知道这可能会发生什么吗?

coc*_*oco 16

实现此方法并返回YES.这可能会有所帮助.

+ (BOOL)requiresConstraintBasedLayout
Run Code Online (Sandbox Code Playgroud)

详情如下:

/sf/answers/1653152861/