EXHostViewControllerDelegate

Trait EXHostViewControllerDelegate 

Source
pub unsafe trait EXHostViewControllerDelegate: NSObjectProtocol + MainThreadOnly {
    // Provided methods
    unsafe fn hostViewControllerDidActivate(
        &self,
        view_controller: &EXHostViewController,
    )
       where Self: Sized + Message { ... }
    unsafe fn hostViewControllerWillDeactivate_error(
        &self,
        view_controller: &EXHostViewController,
        error: Option<&NSError>,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature EXHostViewController only.
Expand description

The delegate for a hosted view controller.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn hostViewControllerDidActivate( &self, view_controller: &EXHostViewController, )
where Self: Sized + Message,

Available on crate feature objc2-app-kit and macOS only.

A delegate method the view controller calls when a connection succeeds.

This delegate method gets called when the extension process has launched and the remote scene connects. After this delegate method gets called the host view controller can establish an XPC connection with the scene in the extension process.

  • Parameters:
  • viewController: The user interface object from the remote process.
Source

unsafe fn hostViewControllerWillDeactivate_error( &self, view_controller: &EXHostViewController, error: Option<&NSError>, )
where Self: Sized + Message,

Available on crate feature objc2-app-kit and macOS only.

A delegate method the host view controller calls when an extension disconnects.

Called when the host view controller stops hosting the remote user interface. This can occur when the extension exits or when the view controller’s configuration property changes.

  • Parameters:

  • viewController: The view controller for the extension that’s disconnecting

  • error: An error object containing information about why the object disconnected, or nil if it’s disconnecting without error.

Trait Implementations§

Source§

impl ProtocolType for dyn EXHostViewControllerDelegate

Source§

const NAME: &'static str = "EXHostViewControllerDelegate"

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 EXHostViewControllerDelegate

Implementations on Foreign Types§

Source§

impl<T> EXHostViewControllerDelegate for ProtocolObject<T>

Implementors§