Contents

accessibilityScroll(_:)

Scrolls screen content in an application-specific way and returns the success or failure of the action.

Declaration

@MainActor func accessibilityScroll(_ direction: UIAccessibilityScrollDirection) -> Bool

Parameters

Return Value

YES if the scrolling action succeeds; otherwise, NO. By default, this method returns NO.

Discussion

Implement this method if a view in the view hierarchy supports a scroll by page action.

  • If the scrolling action succeeds for the specified direction, return YES and post the pageScrolled notification.

  • If the scrolling action fails, accessibilityScroll: is called on a parent view in the hierarchy.

See Also

Performing an action