FUIBaseCollectionViewLayout

open class FUIBaseCollectionViewLayout<LayoutManager> : UICollectionViewLayout where LayoutManager : FUISectionLayoutManager

A base collection view layout class using section layout manager for generating layout attributes for views in a collection view.

  • The margins used to lay out content in a section.

    Declaration

    Swift

    open var sectionInset: UIEdgeInsets
  • The default size(50*50) to use for cells.

    Declaration

    Swift

    open var itemSize: CGSize
  • The estimated size of cells in the collection view.

    Providing an estimated cell size can improve the performance of the collection view when the cells adjust their size dynamically. Specifying an estimate value lets the collection view defer some of the calculations needed to determine the actual size of its content. Specifically, cells that are not onscreen are assumed to be the estimated height.

    The default value of this property is CGSizeZero. Setting it to any other value causes the collection view to query each cell for its actual size using the cell’s preferredLayoutAttributesFitting(_:) method. If all of your cells are the same height, use the itemSize property, instead of this property, to specify the cell size instead.

    Declaration

    Swift

    open var estimatedItemSize: CGSize
  • The spacing to use between items in the same row.

    Declaration

    Swift

    open var interitemSpacing: CGFloat
  • The spacing to use between lines of items in the grid.

    Declaration

    Swift

    open var lineSpacing: CGFloat
  • The default height to use for section headers. Implementing collectionView(_:layout:referenceSizeForHeaderInSection:) will override this property.

    Declaration

    Swift

    open var headerReferenceHeight: CGFloat
  • The default height to use for section footers. Implementing collectionView(_:layout:referenceSizeForFooterInSection:) will override this property.

    Declaration

    Swift

    open var footerReferenceHeight: CGFloat