AutoSizeable

@available(iOS 10.0, *)
public protocol AutoSizeable

Protocol auto size the cell to the device width Note: collectionView.collectionViewLayout estimatedItemSize should equal to UICollectionViewFlowLayoutAutomaticSize

available iOS 10 and above Note> Only supports portraite atm. Landscape is still in R&D

  • Declaration

    Swift

    var widthConstraint: NSLayoutConstraint? { get set }
  • autoSize() Default implementation

    Default Implementation

    Call when device rotates

    Declaration

    Swift

    func autoSize() -> NSLayoutConstraint?