UIScreenshotServiceDelegate

Trait UIScreenshotServiceDelegate 

Source
pub unsafe trait UIScreenshotServiceDelegate: NSObjectProtocol + MainThreadOnly {
    // Provided method
    fn screenshotService_generatePDFRepresentationWithCompletion(
        &self,
        screenshot_service: &UIScreenshotService,
        completion_handler: &DynBlock<dyn Fn(*mut NSData, NSInteger, CGRect)>,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature UIScreenshotService only.
Expand description

Provided Methods§

Source

fn screenshotService_generatePDFRepresentationWithCompletion( &self, screenshot_service: &UIScreenshotService, completion_handler: &DynBlock<dyn Fn(*mut NSData, NSInteger, CGRect)>, )
where Self: Sized + Message,

Available on crate features block2 and objc2-core-foundation only.

The delegate method to send the PDF data to screenshots

The delegate is required to send the data via the completion handler

Parameter screenshotService: The screenshot service object associated per scene

Parameter completionHandler: The block to execute when the PDF data is ready. If no PDF data is available, data can be nil. The indexOfCurrentPage is zero-based, and is the index of the current page of the snapshotted PDF. The rectInCurrentPage is the rect in PDF coordinates with respect to the current page. If the receiver cannot provide the visible area, pass CGRectZero for rectInCurrentPage.

Trait Implementations§

Source§

impl ProtocolType for dyn UIScreenshotServiceDelegate

Source§

const NAME: &'static str = "UIScreenshotServiceDelegate"

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 UIScreenshotServiceDelegate

Implementations on Foreign Types§

Source§

impl<T> UIScreenshotServiceDelegate for ProtocolObject<T>

Implementors§