SplitViewControllerDestinationable
@MainActor
public protocol SplitViewControllerDestinationable<DestinationType, ContentType, TabType> : GroupedControllerDestinationable 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.Columncolumn 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
UISplitViewControllercolumn.Note
This method will throw an error if the requested tab is not found.Default Implementation
Declaration
Swift
@MainActor func presentDestination(destination: any ControllerDestinationable<DestinationType, ContentType, TabType>, in column: UISplitViewController.Column, shouldUpdateSelectedColumn: Bool, removeDestinationFromFlowClosure: RemoveDestinationFromFlowClosure?)Parameters
destinationA UIKit-based Destination to be presented.
columnThe column to present this Destination in.
shouldUpdateSelectedColumnDetermines 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
destinationIDA 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<DestinationType, ContentType, TabType>)?Parameters
columnThe 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
UIViewControllerclass in a column, but is instead theUIViewControllerwhich 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<DestinationType, ContentType, TabType>)?Parameters
columnThe 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<DestinationType, ContentType, TabType>, removeDestinationFromFlowClosure: RemoveDestinationFromFlowClosure? = nil) -
prepareForPresentation()Extension methodDeclaration
Swift
@MainActor func prepareForPresentation()
View on GitHub