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

accessibilityAdjustableAction(_:)

Adds an accessibility adjustable action to the view. アクセシビリティ調節可能アクションをこのビューに加えます。 Actions allow assistive technologies, such as the VoiceOver, to interact with the view by invoking the action.

Declaration 宣言

func accessibilityAdjustableAction(_ handler: @escaping (AccessibilityAdjustmentDirection) -> Void) -> ModifiedContent<Self, AccessibilityAttachmentModifier>

Discussion 議論

For example, this is how an adjustable action to navigate through pages could be added to a view.


var body: some View {
    PageControl()
        .accessibilityAdjustableAction { direction in
            switch direction {
            case .increment:
                // Go to next page
            case .decrement:
                // Go to previous page
            }
        }
}