UIPencilInteractionDelegate

Trait UIPencilInteractionDelegate 

Source
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 { ... }
}
Available on crate feature UIPencilInteraction only.
Expand description

Provided Methods§

Source

fn pencilInteractionDidTap(&self, interaction: &UIPencilInteraction)
where Self: Sized + Message,

👎Deprecated: 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.
Source

fn pencilInteraction_didReceiveTap( &self, interaction: &UIPencilInteraction, tap: &UIPencilInteractionTap, )
where Self: Sized + Message,

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.
Source

fn pencilInteraction_didReceiveSqueeze( &self, interaction: &UIPencilInteraction, squeeze: &UIPencilInteractionSqueeze, )
where Self: Sized + Message,

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

Source§

const NAME: &'static str = "UIPencilInteractionDelegate"

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 UIPencilInteractionDelegate

Implementations on Foreign Types§

Source§

impl<T> UIPencilInteractionDelegate for ProtocolObject<T>

Implementors§