forked from shadowfacts/Tusker
Fix unsatisfiable constraints warning for ZeroHeightCollectionViewCell
This commit is contained in:
parent
e3e55de55b
commit
df07fa85d5
|
@ -12,7 +12,12 @@ class ZeroHeightCollectionViewCell: UICollectionViewCell {
|
||||||
override init(frame: CGRect) {
|
override init(frame: CGRect) {
|
||||||
super.init(frame: frame)
|
super.init(frame: frame)
|
||||||
|
|
||||||
heightAnchor.constraint(equalToConstant: 0).isActive = true
|
// sometimes the collection view imposes a height constraint initially
|
||||||
|
// (though the zero height one still takes effect later)
|
||||||
|
// and we want to suppress the unsatisfiable constraints warning
|
||||||
|
let constraint = heightAnchor.constraint(equalToConstant: 0)
|
||||||
|
constraint.priority = .init(999)
|
||||||
|
constraint.isActive = true
|
||||||
}
|
}
|
||||||
|
|
||||||
required init?(coder: NSCoder) {
|
required init?(coder: NSCoder) {
|
||||||
|
|
Loading…
Reference in New Issue