pub unsafe trait UIEditMenuInteractionDelegate: NSObjectProtocol + MainThreadOnly {
// Provided methods
unsafe fn editMenuInteraction_menuForConfiguration_suggestedActions(
&self,
interaction: &UIEditMenuInteraction,
configuration: &UIEditMenuConfiguration,
suggested_actions: &NSArray<UIMenuElement>,
) -> Option<Retained<UIMenu>>
where Self: Sized + Message { ... }
unsafe fn editMenuInteraction_targetRectForConfiguration(
&self,
interaction: &UIEditMenuInteraction,
configuration: &UIEditMenuConfiguration,
) -> CGRect
where Self: Sized + Message { ... }
unsafe fn editMenuInteraction_willPresentMenuForConfiguration_animator(
&self,
interaction: &UIEditMenuInteraction,
configuration: &UIEditMenuConfiguration,
animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>,
)
where Self: Sized + Message { ... }
unsafe fn editMenuInteraction_willDismissMenuForConfiguration_animator(
&self,
interaction: &UIEditMenuInteraction,
configuration: &UIEditMenuConfiguration,
animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>,
)
where Self: Sized + Message { ... }
}
UIEditMenuInteraction
only.Expand description
Provided Methods§
Available on crate features UIMenu
and UIMenuElement
only.
UIMenu
and UIMenuElement
only.Called when the interaction begins.
Parameter interaction
: The UIEditMenuInteraction.
Parameter configuration
: The UIEditMenuConfiguration object used to present the menu.
Parameter 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
nil
to present the default system menu.
Sourceunsafe fn editMenuInteraction_targetRectForConfiguration(
&self,
interaction: &UIEditMenuInteraction,
configuration: &UIEditMenuConfiguration,
) -> CGRect
Available on crate feature objc2-core-foundation
only.
unsafe fn editMenuInteraction_targetRectForConfiguration( &self, interaction: &UIEditMenuInteraction, configuration: &UIEditMenuConfiguration, ) -> CGRect
objc2-core-foundation
only.Called when the interaction begins, or when
updateVisibleMenuPosition(animated:)
is called.
Parameter interaction
: The UIEditMenuInteraction.
Parameter 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
configuration.sourcePoint
will be used if this method is not implemented. Return
CGRectNull
to use the default rect.
Sourceunsafe fn editMenuInteraction_willPresentMenuForConfiguration_animator(
&self,
interaction: &UIEditMenuInteraction,
configuration: &UIEditMenuConfiguration,
animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>,
)
unsafe fn editMenuInteraction_willPresentMenuForConfiguration_animator( &self, interaction: &UIEditMenuInteraction, configuration: &UIEditMenuConfiguration, animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>, )
Called when the interaction is about to present the menu.
Parameter interaction
: The UIEditMenuInteraction.
Parameter configuration
: The configuration object of the menu about to be presented by this interaction.
Parameter animator
: Appearance animator. Add animations to this object to run them alongside the appearance transition.
Sourceunsafe fn editMenuInteraction_willDismissMenuForConfiguration_animator(
&self,
interaction: &UIEditMenuInteraction,
configuration: &UIEditMenuConfiguration,
animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>,
)
unsafe fn editMenuInteraction_willDismissMenuForConfiguration_animator( &self, interaction: &UIEditMenuInteraction, configuration: &UIEditMenuConfiguration, animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>, )
Called when the interaction is about to dismiss the menu.
Parameter interaction
: The UIEditMenuInteraction.
Parameter configuration
: The configuration object of the menu about to be dismissed by this interaction.
Parameter animator
: Dismiss animator. Add animations to this object to run them alongside the dismiss transition.