Trait UISpringLoadedInteractionBehavior

Source
pub unsafe trait UISpringLoadedInteractionBehavior: NSObjectProtocol + MainThreadOnly {
    // Provided methods
    unsafe fn shouldAllowInteraction_withContext(
        &self,
        interaction: &UISpringLoadedInteraction,
        context: &ProtocolObject<dyn UISpringLoadedInteractionContext>,
    ) -> bool
       where Self: Sized + Message { ... }
    unsafe fn interactionDidFinish(
        &self,
        interaction: &UISpringLoadedInteraction,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature UISpringLoadedInteraction only.
Expand description

The interaction behavior of a UISpringLoadedInteraction object must adopt the UISpringLoadedInteractionBehavior protocol.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn shouldAllowInteraction_withContext( &self, interaction: &UISpringLoadedInteraction, context: &ProtocolObject<dyn UISpringLoadedInteractionContext>, ) -> bool
where Self: Sized + Message,

Returns whether springloading should begin or continue for a given interaction.

Parameter interaction: The springloaded interaction object requesting this information

Parameter context: An object that provides information about the current drag.

Returns: true if the interaction should begin or continue springloading.

Source

unsafe fn interactionDidFinish(&self, interaction: &UISpringLoadedInteraction)
where Self: Sized + Message,

Informs the behavior that springloading for a given interaction was cancelled or activated.

Parameter interaction: The springloaded interaction object providing this information.

Trait Implementations§

Source§

impl ProtocolType for dyn UISpringLoadedInteractionBehavior

Source§

const NAME: &'static str = "UISpringLoadedInteractionBehavior"

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 UISpringLoadedInteractionBehavior

Implementations on Foreign Types§

Source§

impl<T> UISpringLoadedInteractionBehavior for ProtocolObject<T>

Implementors§