//
//  PQStuckPointMusciTagsFlowLayout.swift
//  PQSpeed
//
//  Created by SanW on 2021/4/30.
//  Copyright © 2021 BytesFlow. All rights reserved.
//

import UIKit

class PQStuckPointMusciTagsFlowLayout: UICollectionViewFlowLayout {
    // 整个高度
    var maxH: CGFloat = 0
    // 所有item的属性
    var layoutAttributesArray = [UICollectionViewLayoutAttributes]()

    override func layoutAttributesForElements(in _: CGRect) -> [UICollectionViewLayoutAttributes]? {
        return layoutAttributesArray
    }

    /// 重写设置contentSize
    override var collectionViewContentSize: CGSize {
        get {
            return CGSize(width: (collectionView?.bounds.width)!, height: maxH)
        }
        set {
            self.collectionViewContentSize = newValue
        }
    }
}
