FlowLayout
public struct FlowLayout : Layout
Flow Layout
-
Undocumented
Declaration
Swift
public struct CacheData -
Init
Declaration
Swift
public init(spacing: CGFloat = 8, lineSpacing: CGFloat = 8, alignment: VerticalAlignment = .center, lineLimit: Int? = nil)Parameters
spacingHorizontal spacing between views
lineSpacingVertical spacing between views
alignmentVertical alignment in each row
lineLimitThe maximum number of lines that FlowLayout can have
-
Returns the size of the composite view, given a proposed size and the view’s subviews.
Declaration
Swift
public func sizeThatFits(proposal: ProposedViewSize, subviews: Subviews, cache: inout CacheData) -> CGSize -
Assigns positions to each of the layout’s subviews.
Declaration
Swift
public func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout CacheData) -
Creates and initializes a cache for a layout instance.
Declaration
Swift
public func makeCache(subviews: Subviews) -> CacheData