UILargeContentViewerInteractionDelegate

Trait UILargeContentViewerInteractionDelegate 

Source
pub unsafe trait UILargeContentViewerInteractionDelegate: NSObjectProtocol + MainThreadOnly {
    // Provided methods
    unsafe fn largeContentViewerInteraction_didEndOnItem_atPoint(
        &self,
        interaction: &UILargeContentViewerInteraction,
        item: Option<&ProtocolObject<dyn UILargeContentViewerItem>>,
        point: CGPoint,
    )
       where Self: Sized + Message { ... }
    unsafe fn largeContentViewerInteraction_itemAtPoint(
        &self,
        interaction: &UILargeContentViewerInteraction,
        point: CGPoint,
    ) -> Option<Retained<ProtocolObject<dyn UILargeContentViewerItem>>>
       where Self: Sized + Message { ... }
    unsafe fn viewControllerForLargeContentViewerInteraction(
        &self,
        interaction: &UILargeContentViewerInteraction,
    ) -> Retained<UIViewController>
       where Self: Sized + Message { ... }
}
Available on crate feature UILargeContentViewer only.
Expand description

Provided Methods§

Source

unsafe fn largeContentViewerInteraction_didEndOnItem_atPoint( &self, interaction: &UILargeContentViewerInteraction, item: Option<&ProtocolObject<dyn UILargeContentViewerItem>>, point: CGPoint, )
where Self: Sized + Message,

Available on crate feature objc2-core-foundation only.

Performs an action when the large content viewer gesture ends at the location of the given item. (The point in the interaction’s view’s coordinate system is also provided.) For example, you may wish to perform the action that would have occurred if the user had tapped on that item. If you don’t implement this method and are using standard UIKit controls, the system performs a default action, such as sending a touchUpInside event to the control. This method is called only if the gesture ends successfully (not if it fails or gets canceled).

Source

unsafe fn largeContentViewerInteraction_itemAtPoint( &self, interaction: &UILargeContentViewerInteraction, point: CGPoint, ) -> Option<Retained<ProtocolObject<dyn UILargeContentViewerItem>>>
where Self: Sized + Message,

Available on crate feature objc2-core-foundation only.

Returns the item at a given point in the interaction’s view’s coordinate system. If this is not implemented, -[UIView pointInside:withEvent:] will be called recursively on the interaction’s view to find an appropriate view.

Source

unsafe fn viewControllerForLargeContentViewerInteraction( &self, interaction: &UILargeContentViewerInteraction, ) -> Retained<UIViewController>
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController only.

Returns the view controller whose region of the screen should be used to display the large content viewer. If this is not implemented, a view controller that contains the interaction’s view will be chosen.

Trait Implementations§

Source§

impl ProtocolType for dyn UILargeContentViewerInteractionDelegate

Source§

const NAME: &'static str = "UILargeContentViewerInteractionDelegate"

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 UILargeContentViewerInteractionDelegate

Implementations on Foreign Types§

Source§

impl<T> UILargeContentViewerInteractionDelegate for ProtocolObject<T>

Implementors§