Interface UIPointerInteractionDelegate


  • public interface UIPointerInteractionDelegate
    • Method Detail

      • pointerInteractionRegionForRequestDefaultRegion

        default UIPointerRegion pointerInteractionRegionForRequestDefaultRegion​(UIPointerInteraction interaction,
                                                                                UIPointerRegionRequest request,
                                                                                UIPointerRegion defaultRegion)
        Called as the pointer moves within the interaction's view.
        Parameters:
        interaction - This UIPointerInteraction.
        request - Request object describing the pointer's location in the interaction's view.
        defaultRegion - Region representing the entire surface of the interaction's view.
        Returns:
        A UIPointerRegion in which to apply a pointer style. Return nil to indicate that this interaction should not customize the pointer for the current location.
      • pointerInteractionStyleForRegion

        default UIPointerStyle pointerInteractionStyleForRegion​(UIPointerInteraction interaction,
                                                                UIPointerRegion region)
        Called after the interaction receives a new UIPointerRegion from pointerInteraction:regionForRequest:defaultRegion:.
        Parameters:
        interaction - This UIPointerInteraction.
        region - The UIPointerRegion for which a style is being requested.
        Returns:
        A UIPointerStyle describing the desired hover effect or pointer appearance for the given UIPointerRegion.
      • pointerInteractionWillEnterRegionAnimator

        default void pointerInteractionWillEnterRegionAnimator​(UIPointerInteraction interaction,
                                                               UIPointerRegion region,
                                                               UIPointerInteractionAnimating animator)
        Called when the pointer enters a given region.
        Parameters:
        interaction - This UIPointerInteraction.
        region - The UIPointerRegion the pointer is about to enter.
        animator - Region entrance animator. Add animations to run them alongside the pointer's entrance animation.
      • pointerInteractionWillExitRegionAnimator

        default void pointerInteractionWillExitRegionAnimator​(UIPointerInteraction interaction,
                                                              UIPointerRegion region,
                                                              UIPointerInteractionAnimating animator)
        Called when the pointer exists a given region.
        Parameters:
        interaction - This UIPointerInteraction.
        region - The UIPointerRegion the pointer is about to exit.
        animator - Region exit animator. Add animations to run them alongside the pointer's exit animation.