Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
erikdrobne committed Jun 24, 2024
1 parent bf25e0e commit b04960f
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public protocol Navigator: ObservableObject {
/// The starting route of the navigator.
var startRoute: Route { get }

/// This method should be called to start the flow and to show the view for the `startRoute`.
/// This method should be called to start the flow and to show the view for the `startRoute`.
func start() throws
/// It creates a view for the route and adds it to the navigation stack.
func show(route: Route) throws
Expand All @@ -113,6 +113,30 @@ public protocol Navigator: ObservableObject {
}
```

### TabBarCoordinator

The `TabBarCoordinator` protocol provides a way to manage a tab bar interface in your application.
It defines the necessary properties and methods for handling tab bar navigation.

**Protocol declaration**

```Swift
@MainActor
public protocol TabBarCoordinator: ObservableObject {
associatedtype Route: TabBarNavigationRoute

var navigationController: NavigationController { get }
/// The tab bar controller that manages the tab bar interface.
var tabBarController: UITabBarController { get }
/// The tabs available in the tab bar interface, represented by `Route` types.
var tabs: [Route] { get }
/// This method should be called to show the `tabBarController`.
///
/// - Parameter action:The type of transition can be customized by providing a `TransitionAction`.
func start(with action: TransitionAction)
}
```

## 💿 Installation

### Requirements
Expand Down Expand Up @@ -429,7 +453,6 @@ func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>)
}
```


## 📒 Example project

For better understanding, I recommend that you take a look at the example project located in the `SwiftUICoordinatorExample` folder.
Expand Down

0 comments on commit b04960f

Please sign in to comment.