Package apple.uikit.protocol
Interface UIEditMenuInteractionDelegate
-
public interface UIEditMenuInteractionDelegateAPI-Since: 16.0
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default @Nullable UIMenueditMenuInteractionMenuForConfigurationSuggestedActions(@NotNull UIEditMenuInteraction interaction, @NotNull UIEditMenuConfiguration configuration, @NotNull NSArray<? extends UIMenuElement> suggestedActions)Called when the interaction begins.default CGRecteditMenuInteractionTargetRectForConfiguration(@NotNull UIEditMenuInteraction interaction, @NotNull UIEditMenuConfiguration configuration)Called when the interaction begins, or when @c updateVisibleMenuPosition(animated:) is called.default voideditMenuInteractionWillDismissMenuForConfigurationAnimator(@NotNull UIEditMenuInteraction interaction, @NotNull UIEditMenuConfiguration configuration, @NotNull UIEditMenuInteractionAnimating animator)Called when the interaction is about to dismiss the menu.default voideditMenuInteractionWillPresentMenuForConfigurationAnimator(@NotNull UIEditMenuInteraction interaction, @NotNull UIEditMenuConfiguration configuration, @NotNull UIEditMenuInteractionAnimating animator)Called when the interaction is about to present the menu.
-
-
-
Method Detail
-
editMenuInteractionMenuForConfigurationSuggestedActions
@Nullable default @Nullable UIMenu editMenuInteractionMenuForConfigurationSuggestedActions(@NotNull @NotNull UIEditMenuInteraction interaction, @NotNull @NotNull UIEditMenuConfiguration configuration, @NotNull @NotNull NSArray<? extends UIMenuElement> suggestedActions)
Called when the interaction begins.- Parameters:
interaction- The UIEditMenuInteraction.configuration- The UIEditMenuConfiguration object used to present the menu.suggestedActions- An array of suggested actions gathered from the UIResponder chain. You may include these actions in the hierarchy to display them in the resulting menu.- Returns:
- Return a UIMenu describing the desired menu hierarchy. Return @c nil to present the default system menu.
-
editMenuInteractionTargetRectForConfiguration
default CGRect editMenuInteractionTargetRectForConfiguration(@NotNull @NotNull UIEditMenuInteraction interaction, @NotNull @NotNull UIEditMenuConfiguration configuration)
Called when the interaction begins, or when @c updateVisibleMenuPosition(animated:) is called. [@c] CGRectNull to use the default rect.- Parameters:
interaction- The UIEditMenuInteraction.configuration- The UIEditMenuConfiguration object used to present the menu.- Returns:
- Return a rectangle relative to the interaction's view. The menu will be displayed around target rect, space permitting, with the arrow pointing at the edge of the target rectangle for the specified arrow direction of the configuration. By default, an empty-sized rectangle centered at @c configuration.sourcePoint will be used if this method is not implemented. Return
-
editMenuInteractionWillDismissMenuForConfigurationAnimator
default void editMenuInteractionWillDismissMenuForConfigurationAnimator(@NotNull @NotNull UIEditMenuInteraction interaction, @NotNull @NotNull UIEditMenuConfiguration configuration, @NotNull @NotNull UIEditMenuInteractionAnimating animator)Called when the interaction is about to dismiss the menu.- Parameters:
interaction- The UIEditMenuInteraction.configuration- The configuration object of the menu about to be dismissed by this interaction.animator- Dismiss animator. Add animations to this object to run them alongside the dismiss transition.
-
editMenuInteractionWillPresentMenuForConfigurationAnimator
default void editMenuInteractionWillPresentMenuForConfigurationAnimator(@NotNull @NotNull UIEditMenuInteraction interaction, @NotNull @NotNull UIEditMenuConfiguration configuration, @NotNull @NotNull UIEditMenuInteractionAnimating animator)Called when the interaction is about to present the menu.- Parameters:
interaction- The UIEditMenuInteraction.configuration- The configuration object of the menu about to be presented by this interaction.animator- Appearance animator. Add animations to this object to run them alongside the appearance transition.
-
-