UIPointerInteractionDelegate

Trait UIPointerInteractionDelegate 

Source
pub unsafe trait UIPointerInteractionDelegate: NSObjectProtocol + MainThreadOnly {
    // Provided methods
    fn pointerInteraction_regionForRequest_defaultRegion(
        &self,
        interaction: &UIPointerInteraction,
        request: &UIPointerRegionRequest,
        default_region: &UIPointerRegion,
    ) -> Option<Retained<UIPointerRegion>>
       where Self: Sized + Message { ... }
    fn pointerInteraction_styleForRegion(
        &self,
        interaction: &UIPointerInteraction,
        region: &UIPointerRegion,
    ) -> Option<Retained<UIPointerStyle>>
       where Self: Sized + Message { ... }
    fn pointerInteraction_willEnterRegion_animator(
        &self,
        interaction: &UIPointerInteraction,
        region: &UIPointerRegion,
        animator: &ProtocolObject<dyn UIPointerInteractionAnimating>,
    )
       where Self: Sized + Message { ... }
    fn pointerInteraction_willExitRegion_animator(
        &self,
        interaction: &UIPointerInteraction,
        region: &UIPointerRegion,
        animator: &ProtocolObject<dyn UIPointerInteractionAnimating>,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature UIPointerInteraction only.
Expand description

Provided Methods§

Source

fn pointerInteraction_regionForRequest_defaultRegion( &self, interaction: &UIPointerInteraction, request: &UIPointerRegionRequest, default_region: &UIPointerRegion, ) -> Option<Retained<UIPointerRegion>>
where Self: Sized + Message,

Available on crate feature UIPointerRegion only.

Called as the pointer moves within the interaction’s view.

Parameter interaction: This UIPointerInteraction.

Parameter request: Request object describing the pointer’s location in the interaction’s view.

Parameter defaultRegion: Region representing the entire surface of the interaction’s view.

Returns: A UIPointerRegion in which to apply a pointer style. Return nil to indicate that this interaction should not customize the pointer for the current location.

Source

fn pointerInteraction_styleForRegion( &self, interaction: &UIPointerInteraction, region: &UIPointerRegion, ) -> Option<Retained<UIPointerStyle>>
where Self: Sized + Message,

Available on crate features UIHoverStyle and UIPointerRegion and UIPointerStyle only.

Called after the interaction receives a new UIPointerRegion from pointerInteraction:regionForRequest:defaultRegion:.

Parameter interaction: This UIPointerInteraction.

Parameter region: The UIPointerRegion for which a style is being requested.

Returns: A UIPointerStyle describing the desired hover effect or pointer appearance for the given UIPointerRegion.

Source

fn pointerInteraction_willEnterRegion_animator( &self, interaction: &UIPointerInteraction, region: &UIPointerRegion, animator: &ProtocolObject<dyn UIPointerInteractionAnimating>, )
where Self: Sized + Message,

Available on crate feature UIPointerRegion only.

Called when the pointer enters a given region.

Parameter interaction: This UIPointerInteraction.

Parameter region: The UIPointerRegion the pointer is about to enter.

Parameter animator: Region entrance animator. Add animations to run them alongside the pointer’s entrance animation.

Source

fn pointerInteraction_willExitRegion_animator( &self, interaction: &UIPointerInteraction, region: &UIPointerRegion, animator: &ProtocolObject<dyn UIPointerInteractionAnimating>, )
where Self: Sized + Message,

Available on crate feature UIPointerRegion only.

Called when the pointer exists a given region.

Parameter interaction: This UIPointerInteraction.

Parameter region: The UIPointerRegion the pointer is about to exit.

Parameter animator: Region exit animator. Add animations to run them alongside the pointer’s exit animation.

Trait Implementations§

Source§

impl ProtocolType for dyn UIPointerInteractionDelegate

Source§

const NAME: &'static str = "UIPointerInteractionDelegate"

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 UIPointerInteractionDelegate

Implementations on Foreign Types§

Source§

impl<T> UIPointerInteractionDelegate for ProtocolObject<T>

Implementors§