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§
Sourceunsafe fn shouldAllowInteraction_withContext(
&self,
interaction: &UISpringLoadedInteraction,
context: &ProtocolObject<dyn UISpringLoadedInteractionContext>,
) -> bool
unsafe 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.
Sourceunsafe fn interactionDidFinish(&self, interaction: &UISpringLoadedInteraction)
unsafe 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.