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 { ... }
}EXHostViewController only.Expand description
The delegate for a hosted view controller.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn hostViewControllerDidActivate(
&self,
view_controller: &EXHostViewController,
)
Available on crate feature objc2-app-kit and macOS only.
unsafe fn hostViewControllerDidActivate( &self, view_controller: &EXHostViewController, )
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.
Sourceunsafe fn hostViewControllerWillDeactivate_error(
&self,
view_controller: &EXHostViewController,
error: Option<&NSError>,
)
Available on crate feature objc2-app-kit and macOS only.
unsafe fn hostViewControllerWillDeactivate_error( &self, view_controller: &EXHostViewController, error: Option<&NSError>, )
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
nilif it’s disconnecting without error.