TabBarControllerDestinationInterfacing
@MainActor
public protocol TabBarControllerDestinationInterfacing<TabType> : UITabBarController, ControllerDestinationInterfacing, TabBarDestinationInterfacing where Self.Destination : TabBarControllerDestinationable
A protocol representing a UITabBarController class which conforms to Destinations.
-
currentController(for:Default implementation) Returns the currently presented controller in the specified tab.
Default Implementation
Declaration
Swift
@MainActor func currentController(for tab: TabType) -> (any ControllerDestinationInterfacing)?Parameters
tabThe tab type.
Return Value
A
UIViewController, if one is found. -
This method gives a chance to customize
UITabItems during tabs setup, and should be implemented in concreteUITabBarControllerclasses conforming to this protocol.Declaration
Swift
@MainActor func customizeTabItem(for tab: TabType, navigationController: UINavigationController)Parameters
tabThe tab to customize.
navigationControllerThe navigation controller whose
tabItemproperty should be customized. -
tabIndex(for:Default implementation) Returns the
tabIndexfor the requested tab type.Default Implementation
Declaration
Swift
@MainActor func tabIndex(for tab: TabType) -> Int?Parameters
tabThe tab type.
Return Value
The
tabIndexof the tab, if the requested tab type was found. -
tab(destinationID:Default implementation) Returns a tab type associated with the specified Destination.
Default Implementation
Declaration
Swift
@MainActor func tab(destinationID: UUID) -> TabType?Parameters
destinationIDThe Destination identifier associated with the requested tab.
Return Value
The requested tab type, if one was found.
-
gotoTab(_:Default implementation) Switches the active tab
Note: Requesting a tab type that isn’t in the active tabs list will result in a
DestinationsError.tabNotFounderror being thrown.Default Implementation
Declaration
Swift
@MainActor func gotoTab(_ type: TabType) throwsParameters
typeThe type of tab to make to.
View on GitHub