Contents

subscript(_:)

Gets the value of the given depth guide.

Declaration

subscript(guide: DepthAlignment) -> CGFloat { get }

Overview

Find the offset of a particular guide in the corresponding view by using that guide as an index to read from the context:

.alignmentGuide(.front) { context in
    context[.front] - 10
}

For information about using subscripts in Swift to access member elements of a collection, list, or, sequence, see Subscripts in The Swift Programming Language.