//
//  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
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
