ScrollLayoutGuide

open class ScrollLayoutGuide<Super> : LayoutGuide<Super> where Super : LayoutElement

Layout guide that provides interface for scrolling content

  • Designed initializer

    Declaration

    Swift

    public required init(layout: LayoutBlockProtocol)

    Parameters

    layout

    Layout defined scrollable content

  • Point that defines offset for content origin

    Declaration

    Swift

    open var contentOffset: CGPoint { get set }
  • Size of content

    Declaration

    Swift

    open var contentSize: CGSize
  • Undocumented

    Declaration

    Swift

    open var contentInset: EdgeInsets { get set }
  • Undocumented

    Declaration

    Swift

    override public var layoutBounds: CGRect { get }
  • Performs layout for subelements, which this layout guide manages, in layout space rect

    Declaration

    Swift

    override open func layout(in rect: CGRect)

    Parameters

    rect

    Space for layout

  • Defines rect for content that will be visible in this guide space.

    Declaration

    Swift

    override open func contentRect(forFrame frame: CGRect) -> CGRect

    Parameters

    frame

    New frame value.

    Return Value

    Content rect

ScrollLayoutGuide

  • Convinience initializer for adjustable layout elements. Initializes layout guide with layout block constrained to calculated size of element.

    Declaration

    Swift

    convenience init<Item>(contentItem: Item, direction: ScrollDirection) where Item : AdjustableLayoutElement

    Parameters

    contentItem

    Item that defines content

    direction

    Scroll direction