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§
Sourcefn shouldAllowInteraction_withContext(
&self,
interaction: &UISpringLoadedInteraction,
context: &ProtocolObject<dyn UISpringLoadedInteractionContext>,
) -> bool
fn shouldAllowInteraction_withContext( &self, interaction: &UISpringLoadedInteraction, context: &ProtocolObject<dyn UISpringLoadedInteractionContext>, ) -> bool
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.
Sourcefn interactionDidFinish(&self, interaction: &UISpringLoadedInteraction)
fn interactionDidFinish(&self, interaction: &UISpringLoadedInteraction)
Informs the behavior that springloading for a given interaction was cancelled or activated.
Parameter interaction: The springloaded interaction object providing this information.
Trait Implementations§
impl<T> ImplementedBy<T> for dyn UISpringLoadedInteractionBehavior
Source§impl ProtocolType for dyn UISpringLoadedInteractionBehavior
impl ProtocolType for dyn UISpringLoadedInteractionBehavior
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".