pub unsafe trait UIPencilInteractionDelegate: NSObjectProtocol + MainThreadOnly {
// Provided methods
fn pencilInteractionDidTap(&self, interaction: &UIPencilInteraction)
where Self: Sized + Message { ... }
fn pencilInteraction_didReceiveTap(
&self,
interaction: &UIPencilInteraction,
tap: &UIPencilInteractionTap,
)
where Self: Sized + Message { ... }
fn pencilInteraction_didReceiveSqueeze(
&self,
interaction: &UIPencilInteraction,
squeeze: &UIPencilInteractionSqueeze,
)
where Self: Sized + Message { ... }
}UIPencilInteraction only.Expand description
Provided Methods§
Sourcefn pencilInteractionDidTap(&self, interaction: &UIPencilInteraction)
👎Deprecated: Use pencilInteraction(_:didReceiveTap:) instead
fn pencilInteractionDidTap(&self, interaction: &UIPencilInteraction)
Use pencilInteraction(_:didReceiveTap:) instead
Called when the user taps on the side of the pencil if the interaction’s view is in a visible view hierarchy.
The delegate may do anything in this method. To perform the user’s preferred tap action (as set in Settings), consult the preferredTapAction class property
of UIPencilInteraction.
- Note: If
pencilInteraction(_:didReceiveTap:)is implemented, this method will not be called.
Sourcefn pencilInteraction_didReceiveTap(
&self,
interaction: &UIPencilInteraction,
tap: &UIPencilInteractionTap,
)
fn pencilInteraction_didReceiveTap( &self, interaction: &UIPencilInteraction, tap: &UIPencilInteractionTap, )
Called when the user taps on the side of the pencil if the interaction’s view is in a visible view hierarchy.
The delegate may do anything in this method. To perform the user’s preferred tap action (as set in Settings), consult the preferredTapAction class property
of UIPencilInteraction.
- Note: If both this method and the deprecated
pencilInteractionDidTap(_:)are implemented, then only this method will be called.
Sourcefn pencilInteraction_didReceiveSqueeze(
&self,
interaction: &UIPencilInteraction,
squeeze: &UIPencilInteractionSqueeze,
)
fn pencilInteraction_didReceiveSqueeze( &self, interaction: &UIPencilInteraction, squeeze: &UIPencilInteractionSqueeze, )
Called when the user squeezes side of the pencil if the interaction’s view is in a visible view hierarchy.
The delegate may do anything in this method. To perform the user’s preferred squeeze action (as set in Settings), consult the preferredSqueezeAction class
property of UIPencilInteraction.
Trait Implementations§
Source§impl ProtocolType for dyn UIPencilInteractionDelegate
impl ProtocolType for dyn UIPencilInteractionDelegate
impl<T> ImplementedBy<T> for dyn UIPencilInteractionDelegate
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".