SplitViewControllerDestinationable
@MainActor
public protocol SplitViewControllerDestinationable<PresentationConfiguration> : ControllerDestinationable, GroupedDestinationable where Self.ControllerType : UISplitViewController
This protocol represents a Destination whose interface is a UISplitViewController
.
-
A dictionary of
UIViewController
-based Destination object identifiers, whose associated keys are theUISplitViewController.Column
column type should be displayed in.Declaration
Swift
@MainActor var destinationIDsForColumns: [UISplitViewController.Column : UUID] { get set }
-
presentDestination(destination:
Default implementationin: shouldUpdateSelectedColumn: removeDestinationFromFlowClosure: ) Presents a Destination in a
UISplitViewController
column.Note
This method will throw an error if the requested tab is not found.Default Implementation
Declaration
Swift
@MainActor func presentDestination(destination: any ControllerDestinationable<PresentationConfiguration>, in column: UISplitViewController.Column, shouldUpdateSelectedColumn: Bool, removeDestinationFromFlowClosure: RemoveDestinationFromFlowClosure?)
Parameters
destination
A UIKit-based Destination to be presented.
column
The column to present this Destination in.
shouldUpdateSelectedColumn
Determines whether the column should become the current one.
-
column(destinationID:
Default implementation) Returns a column type if it finds a Destination identifier which matches the root Destination for that column.
Default Implementation
Declaration
Swift
@MainActor func column(destinationID: UUID) -> UISplitViewController.Column?
Parameters
destinationID
A Destination identifier representing the root Destination of a column.
Return Value
A split view column type, if a matching Destination identifier was supplied.
-
currentDestination(for:
Default implementation) Returns the current Destination for the specified colunn. In the case where multiple Destinations are presented in a column, it will return the most recently-presented (visible) one.
Default Implementation
Declaration
Swift
@MainActor func currentDestination(for column: UISplitViewController.Column) -> (any ControllerDestinationable<PresentationConfiguration>)?
Parameters
column
The column type.
Return Value
A
Controller
-based Destination, if one was found. -
rootDestination(for:
Default implementation) Returns the root Destination for the column. This is not necessarily the Destination representing the currently visible
UIViewController
class in a column, but is instead theUIViewController
which is at the column’s root level.This method should be used when building the column for a
UISplitViewController
.Default Implementation
Declaration
Swift
@MainActor func rootDestination(for column: UISplitViewController.Column) -> (any ControllerDestinationable<PresentationConfiguration>)?
Parameters
column
The column type.
Return Value
A Destination, if one was found.
-
updateChildren()
Extension methodDeclaration
Swift
@MainActor func updateChildren()
-
replaceChild(currentID:
Extension methodwith: removeDestinationFromFlowClosure: ) Declaration
Swift
@MainActor func replaceChild(currentID: UUID, with newDestination: any Destinationable<PresentationConfiguration>, removeDestinationFromFlowClosure: RemoveDestinationFromFlowClosure? = nil)