Sizing

public enum Sizing : Equatable

Controls the sizing calculation of the custom layout.

  • Ensures that the final size of element is large enough to fit all children, starting from (0,0).

    Negative origins of rects are not considered in this calculation. If you have the following layout:

     ┌──────┐
           ├─────────┐
           *********
     └─┬────┘**┌──────┤
       *******      
       *******      
    ┌──┴───┐***      
          ***      
          ***└──────┤
    └──────┴──────────┘
    

    The large rect will be the calculated size / bounds of the layout, starting at (0,0). Any rects with negative origins will overhang the layout to the top or left, respectively.

    Declaration

    Swift

    case unionOfChildren
  • Fixes the layout size to the provided size. Children are positioned within this size, starting at (0,0) Any rects with negative origins will overhang the layout to the top or left, respectively.

    Declaration

    Swift

    case fixed(CGSize)