FUICollectionViewLayout

public enum FUICollectionViewLayout

Set of UICollectionViewFlowLayouts occurring in Fiori Design Language.

  • Flow layout, in which all items per section are displayed in a single row. User may scroll horizontally, to view hidden items.

    Item size is fixed, based on self.itemSize.

    Important

    Developer should set value for self.itemSize. self.estimatedItemSize will be ignored.

    Declaration

    Swift

    public static var horizontalScroll: FUIHorizontalScrollCollectionViewLayout
  • Flow layout, in which all items per section are displayed left to right, and wrapped to multiple rows, to fit.

    Developer may configure the size of items to be fixed, or scale to fit to the width of the collection view content size.

    ## Usage “`swift self.collectionView.collectionViewLayout = FUICollectionViewLayout.horizontalFlow

    // MARK: to scale items to fit width of collection view, set estimatedItemSize self.collectionView.collectionViewLayout.estimatedItemSize = CGSize(width: 320, height: 320)

    // MARK: to set item size statically, set itemSize self.collectionView.collectionViewLayout.itemSize = CGSize(width: 220, height: 220) ”`

    Declaration

    Swift

    public static var horizontalFlow: FUIHorizontalFlowCollectionViewLayout
  • A grid-style flow layout, in which the Developer may specify the count of ‘columns’ which may be displayed per row.

    UICollectionViewCell items will be scaled horizontally, to fit the calculated column width. Cell items will be scaled vertically, according to their AutoLayout-determined intrinsic content size. Items for each row are top-aligned.

    Declaration

    Swift

    public static var autosizingColumnFlow: FUIStandardAutoSizingColumnFlowLayout
  • A variant of FUIStandardAutoSizingColumnFlowLayout.

    • minimumInteritemSpacing is set to 80.
    • minimumLineSpacing is set to 24.
    • sectionInset is set to UIEdgeInsetsMake(0, 8, 0, 8).

    Declaration

    Swift

    public static var keyValueColumnFlow: FUIKeyValueFlowLayout