Package apple.uikit.protocol
Interface UIPointerInteractionDelegate
-
public interface UIPointerInteractionDelegateAPI-Since: 13.4
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default @Nullable UIPointerRegionpointerInteractionRegionForRequestDefaultRegion(@NotNull UIPointerInteraction interaction, @NotNull UIPointerRegionRequest request, @NotNull UIPointerRegion defaultRegion)Called as the pointer moves within the interaction's view.default @Nullable UIPointerStylepointerInteractionStyleForRegion(@NotNull UIPointerInteraction interaction, @NotNull UIPointerRegion region)Called after the interaction receives a new UIPointerRegion from pointerInteraction:regionForRequest:defaultRegion:.default voidpointerInteractionWillEnterRegionAnimator(@NotNull UIPointerInteraction interaction, @NotNull UIPointerRegion region, @NotNull UIPointerInteractionAnimating animator)Called when the pointer enters a given region.default voidpointerInteractionWillExitRegionAnimator(@NotNull UIPointerInteraction interaction, @NotNull UIPointerRegion region, @NotNull UIPointerInteractionAnimating animator)Called when the pointer exists a given region.
-
-
-
Method Detail
-
pointerInteractionRegionForRequestDefaultRegion
@Nullable default @Nullable UIPointerRegion pointerInteractionRegionForRequestDefaultRegion(@NotNull @NotNull UIPointerInteraction interaction, @NotNull @NotNull UIPointerRegionRequest request, @NotNull @NotNull 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
@Nullable default @Nullable UIPointerStyle pointerInteractionStyleForRegion(@NotNull @NotNull UIPointerInteraction interaction, @NotNull @NotNull 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(@NotNull @NotNull UIPointerInteraction interaction, @NotNull @NotNull UIPointerRegion region, @NotNull @NotNull 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(@NotNull @NotNull UIPointerInteraction interaction, @NotNull @NotNull UIPointerRegion region, @NotNull @NotNull 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.
-
-