Skip to main content

alignment_guide

Function alignment_guide 

Source
pub fn alignment_guide(
    view: &ViewHandle,
    alignment: HorizontalAlignment,
    compute: impl Fn(ViewDimensions) -> f64 + 'static,
) -> ViewHandle
Expand description

Apply .alignmentGuide(_:computeValue:).

computeValue returns a CGFloat, which comes back in d0 — so it needs a thunk of its own; the integer-returning one cannot carry it.