Instance Property インスタンスプロパティ

resetFocus

An action that requests the focus system to reevaluate default focus.

Declaration 宣言

var resetFocus: ResetFocusAction { get }

Discussion 議論

Get this environment value and call and call it as a function to force a default focus reevaluation at runtime.


@Namespace var mainNamespace
@Environment(\.resetFocus) var resetFocus


var body: some View {
    // ...
    resetFocus(in: mainNamespace)
    // ...
}

See Also 参照

Actions