Tusker/Tusker/Views/ZeroHeightCollectionViewCel...

27 lines
783 B
Swift
Raw Normal View History

2022-12-04 03:16:43 +00:00
//
// ZeroHeightCollectionViewCell.swift
// Tusker
//
// Created by Shadowfacts on 12/3/22.
// Copyright © 2022 Shadowfacts. All rights reserved.
//
import UIKit
class ZeroHeightCollectionViewCell: UICollectionViewCell {
override init(frame: CGRect) {
super.init(frame: frame)
// 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
2022-12-04 03:16:43 +00:00
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}