Skip to main content

focused_value

Function focused_value 

Source
pub fn focused_value(view: &ViewHandle, present: bool) -> ViewHandle
Expand description

Apply .focusedValue(_:) with an Observable object.

The overload taking a key path needs a property on FocusedValues, which only a client declares — so this is the other one, generic over AnyObject & Observable. AnyObject is a layout constraint and contributes no witness table; only the Observable conformance does, and that is synthesized, because Observable has no requirements to satisfy.