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

accessibilityRotorEntry(id:in:)

Defines an explicit identifier tying an Accessibility element for this view to an entry in an Accessibility Rotor.

Declaration 宣言

func accessibilityRotorEntry<ID>(id: ID, in namespace: Namespace.ID) -> some View where ID : Hashable

Parameters パラメータ

id

An arbitrary hashable identifier. Pass this same value when initializing an AccessibilityRotorEntry.

namespace

A namespace created with @Namespace(). Pass this same namespace when initializing an AccessibilityRotorEntry.

Discussion 議論

Use this when creating an AccessibilityRotorEntry without a namespace does not allow SwiftUI to automatically find and reveal the element, or when the Rotor entry should be associated with a sub-element of a complex view generated in a ForEach, for example.

See Also 参照

Configuring Rotors