UIEditMenuInteractionDelegate

Trait UIEditMenuInteractionDelegate 

Source
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 { ... }
}
Available on crate feature UIEditMenuInteraction only.
Expand description

Provided Methods§

Source

unsafe fn editMenuInteraction_menuForConfiguration_suggestedActions( &self, interaction: &UIEditMenuInteraction, configuration: &UIEditMenuConfiguration, suggested_actions: &NSArray<UIMenuElement>, ) -> Option<Retained<UIMenu>>
where Self: Sized + Message,

Available on crate features 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 nilto present the default system menu.

Source

unsafe fn editMenuInteraction_targetRectForConfiguration( &self, interaction: &UIEditMenuInteraction, configuration: &UIEditMenuConfiguration, ) -> CGRect
where Self: Sized + Message,

Available on crate feature 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.sourcePointwill be used if this method is not implemented. Return CGRectNullto use the default rect.

Source

unsafe fn editMenuInteraction_willPresentMenuForConfiguration_animator( &self, interaction: &UIEditMenuInteraction, configuration: &UIEditMenuConfiguration, animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>, )
where Self: Sized + Message,

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.

Source

unsafe fn editMenuInteraction_willDismissMenuForConfiguration_animator( &self, interaction: &UIEditMenuInteraction, configuration: &UIEditMenuConfiguration, animator: &ProtocolObject<dyn UIEditMenuInteractionAnimating>, )
where Self: Sized + Message,

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.

Trait Implementations§

Source§

impl ProtocolType for dyn UIEditMenuInteractionDelegate

Source§

const NAME: &'static str = "UIEditMenuInteractionDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn UIEditMenuInteractionDelegate

Implementations on Foreign Types§

Source§

impl<T> UIEditMenuInteractionDelegate for ProtocolObject<T>

Implementors§