Skip to main content

UISpringLoadedInteractionBehavior

Trait UISpringLoadedInteractionBehavior 

Source
pub unsafe trait UISpringLoadedInteractionBehavior: NSObjectProtocol + MainThreadOnly {
    // Provided methods
    fn shouldAllowInteraction_withContext(
        &self,
        interaction: &UISpringLoadedInteraction,
        context: &ProtocolObject<dyn UISpringLoadedInteractionContext>,
    ) -> bool
       where Self: Sized + Message { ... }
    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

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

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<T> ImplementedBy<T> for dyn UISpringLoadedInteractionBehavior

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> UISpringLoadedInteractionBehavior for ProtocolObject<T>

Implementors§