Interface UISpringLoadedInteractionBehavior


  • public interface UISpringLoadedInteractionBehavior
    The interaction behavior of a `UISpringLoadedInteraction` object must adopt the `UISpringLoadedInteractionBehavior` protocol.
    • Method Detail

      • interactionDidFinish

        default void interactionDidFinish​(UISpringLoadedInteraction interaction)
        Informs the behavior that springloading for a given interaction was cancelled or activated.
        Parameters:
        interaction - The springloaded interaction object providing this information.
      • shouldAllowInteractionWithContext

        boolean shouldAllowInteractionWithContext​(UISpringLoadedInteraction interaction,
                                                  UISpringLoadedInteractionContext context)
        Returns whether springloading should begin or continue for a given interaction.
        Parameters:
        interaction - The springloaded interaction object requesting this information
        context - An object that provides information about the current drag.
        Returns:
        true if the interaction should begin or continue springloading.