Instance Method インスタンスメソッド

focusScope(_:)

Creates a focus scope that SwiftUI uses to limit default focus preferences.

Declaration 宣言

func focusScope(_ namespace: Namespace.ID) -> some View

Return Value 戻り値

A view that sets the namespace of descendants for default focus.

Parameters パラメータ

namespace

A namespace identifier that SwiftUI can use to scope default focus preferences.

Discussion 議論

The returned view gets associated with the provided namespace. 返されるビューは、提供された名前空間と結び付けられます。 Pass this namespace to prefersDefaultFocus(_:in:) and the resetFocus function.

See Also 参照

Focus