Trait UIDocumentBrowserViewControllerDelegate

Source
pub unsafe trait UIDocumentBrowserViewControllerDelegate: NSObjectProtocol {
    // Provided methods
    unsafe fn documentBrowser_didPickDocumentURLs(
        &self,
        controller: &UIDocumentBrowserViewController,
        document_ur_ls: &NSArray<NSURL>,
    )
       where Self: Sized + Message { ... }
    unsafe fn documentBrowser_didPickDocumentsAtURLs(
        &self,
        controller: &UIDocumentBrowserViewController,
        document_ur_ls: &NSArray<NSURL>,
    )
       where Self: Sized + Message { ... }
    unsafe fn documentBrowser_didRequestDocumentCreationWithHandler(
        &self,
        controller: &UIDocumentBrowserViewController,
        import_handler: &DynBlock<dyn Fn(*mut NSURL, UIDocumentBrowserImportMode)>,
    )
       where Self: Sized + Message { ... }
    unsafe fn documentBrowser_didImportDocumentAtURL_toDestinationURL(
        &self,
        controller: &UIDocumentBrowserViewController,
        source_url: &NSURL,
        destination_url: &NSURL,
    )
       where Self: Sized + Message { ... }
    unsafe fn documentBrowser_failedToImportDocumentAtURL_error(
        &self,
        controller: &UIDocumentBrowserViewController,
        document_url: &NSURL,
        error: Option<&NSError>,
    )
       where Self: Sized + Message { ... }
    unsafe fn documentBrowser_applicationActivitiesForDocumentURLs(
        &self,
        controller: &UIDocumentBrowserViewController,
        document_ur_ls: &NSArray<NSURL>,
    ) -> Retained<NSArray<UIActivity>>
       where Self: Sized + Message { ... }
    unsafe fn documentBrowser_willPresentActivityViewController(
        &self,
        controller: &UIDocumentBrowserViewController,
        activity_view_controller: &UIActivityViewController,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature UIDocumentBrowserViewController only.
Expand description

Provided Methods§

Source

unsafe fn documentBrowser_didPickDocumentURLs( &self, controller: &UIDocumentBrowserViewController, document_ur_ls: &NSArray<NSURL>, )
where Self: Sized + Message,

👎Deprecated
Available on crate features UIResponder and UIViewController only.

Called when the user validates a selection of items to open or pick. If you have created this document manager to open files, you should then open the document, potentially using a UIDocumentBrowserTransitionControllerfor the transition.

Source

unsafe fn documentBrowser_didPickDocumentsAtURLs( &self, controller: &UIDocumentBrowserViewController, document_ur_ls: &NSArray<NSURL>, )
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController only.
Source

unsafe fn documentBrowser_didRequestDocumentCreationWithHandler( &self, controller: &UIDocumentBrowserViewController, import_handler: &DynBlock<dyn Fn(*mut NSURL, UIDocumentBrowserImportMode)>, )
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController and block2 only.

When the user requests the creation of a new document, this method will be called. The application can then, optionally, present UI it deems appropriate to let the user configure the new document (for example, it could show a list of templates). When done, create an empty document or a copy of your template to a temporary location. Then use the importHandler to pass the document URL to be imported. If the user cancels the document creation, it’s still expetected to call importHandler(nil, UIDocumentBrowserImportModeNone). The Document Browser will asynchronously move the document to its final destination and call back one of the following delegate methods: -documentBrowser:didImportDocumentURL:toDestinationURL: -documentBrowser:failedToImportDocumentAtURL:error: The app should wait for the delegate callbacks before presenting the imported document at the destination URL. Usage of UIDocument is recommended. If you do not implement this method, document creation will not be available.

Source

unsafe fn documentBrowser_didImportDocumentAtURL_toDestinationURL( &self, controller: &UIDocumentBrowserViewController, source_url: &NSURL, destination_url: &NSURL, )
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController only.
Source

unsafe fn documentBrowser_failedToImportDocumentAtURL_error( &self, controller: &UIDocumentBrowserViewController, document_url: &NSURL, error: Option<&NSError>, )
where Self: Sized + Message,

Available on crate features UIResponder and UIViewController only.
Source

unsafe fn documentBrowser_applicationActivitiesForDocumentURLs( &self, controller: &UIDocumentBrowserViewController, document_ur_ls: &NSArray<NSURL>, ) -> Retained<NSArray<UIActivity>>
where Self: Sized + Message,

Available on crate features UIActivity and UIResponder and UIViewController only.

Allows clients to add application specific UIActivity instances

Source

unsafe fn documentBrowser_willPresentActivityViewController( &self, controller: &UIDocumentBrowserViewController, activity_view_controller: &UIActivityViewController, )
where Self: Sized + Message,

Available on crate features UIActivityViewController and UIResponder and UIViewController only.

Implement this to customize the UIActivityViewController before it’s presented.

Trait Implementations§

Source§

impl ProtocolType for dyn UIDocumentBrowserViewControllerDelegate

Source§

const NAME: &'static str = "UIDocumentBrowserViewControllerDelegate"

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 UIDocumentBrowserViewControllerDelegate

Implementations on Foreign Types§

Source§

impl<T> UIDocumentBrowserViewControllerDelegate for ProtocolObject<T>

Implementors§