{"id":15170617,"url":"https://github.com/felilo/alcoordinator","last_synced_at":"2025-10-25T19:30:58.578Z","repository":{"id":99157197,"uuid":"608874236","full_name":"felilo/ALCoordinator","owner":"felilo","description":"Coordinators either UIKit or SWiftUI. Simple, powerful and elegant.","archived":false,"fork":false,"pushed_at":"2023-08-02T17:32:14.000Z","size":94,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-24T16:37:31.937Z","etag":null,"topics":["coordinator-pattern","mvvm","mvvm-c","navigation-stack","swift","swiftui","viper"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/felilo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-02T23:00:53.000Z","updated_at":"2024-02-23T23:48:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"48abb3e1-7c21-4ffb-89a9-877df9006310","html_url":"https://github.com/felilo/ALCoordinator","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felilo%2FALCoordinator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felilo%2FALCoordinator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felilo%2FALCoordinator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felilo%2FALCoordinator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felilo","download_url":"https://codeload.github.com/felilo/ALCoordinator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219865149,"owners_count":16555931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coordinator-pattern","mvvm","mvvm-c","navigation-stack","swift","swiftui","viper"],"created_at":"2024-09-27T08:04:16.733Z","updated_at":"2025-10-25T19:30:58.188Z","avatar_url":"https://github.com/felilo.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ALCoodinator\n\nThis repository contains a library implementing the Coordinator pattern, which is a design pattern used in iOS app development to manage app navigation flows. \nThe library provides a set of classes and protocols that can be used to implement the Coordinator pattern in an iOS app. It works either UIKit or SwiftUI apps\nIts core navigation has created with UINavigationController (UIKit) with the aim to get profit about navigation stack.\n_____\n\n## Getting Started\n\nTo use the Coordinator pattern library in your iOS project, you'll need to add the library files to your project and set up a Coordinator object.\nHere are the basic steps:\n_____\n\n## Defining the coordinator\nFirst let's define our paths and its views.\n\u003e **_NOTE:_** If you want to create a UIKit-compatible coordinator, you must **`import UIKCoordinator`** otherwise **`import SUICoordinator`**. \n\u003e Next we are going to write an example of SwiftUI\n\n\u003cbr\u003e\n\n```swift\nimport SUICoordinator\nimport SwiftUI\n\nenum OnboardingRoute: NavigationRoute {\n  \n  case firstStep(viewModel: FirstViewModel)\n  case secondStep(viewModel: SecondViewModel)\n  \n  // MARK: NavigationRouter\n  \n  var transition: NavigationTransitionStyle {\n    switch self {\n      case .firstStep:\n        return .push\n      case .secondStep:\n        return .modal\n    }\n  }\n  \n  func view() -\u003e any View {\n    switch self {\n      case .firstStep(let vm):\n        return FirstView()\n          .environmentObject(vm)\n      case .secondStep(let vm):\n        return SecondView(viewModel: vm)\n    }\n  }\n}\n```\n\nSecond let's create our first Coordinator. All coordinator should to implement the ``start()`` function and then starts the flow (mandatory). Finally add additional flows\n\n```swift\nimport SUICoordinator\n\nclass OnboardingCoordinator: NavigationCoordinator\u003cOnboardingRoute\u003e {\n\n  // MARK: Coordinator\n  \n  override func start(animated: Bool) {\n    let vm = FirstViewModel(coordinator: self)\n    router.startFlow(\n      route: .firstStep(viewModel: vm),\n      animated: animated\n    )\n  }\n\n  // MARK: Helper funcs\n  \n  func showStep2() {\n    let vm = SecondViewModel(coordinator: self)\n    router.navigate(to: .secondStep(viewModel: vm))\n  }\n  \n  func showHomeCoordinator() {\n    let coordinator = HomeCoordinatorSUI(currentPage: .settings)\n    router.navigate(to: coordinator)\n  }\n}\n```\n\n_____\n\n## Create a TabbarCoordinator\n\n### 1. Create a router\n\n```swift\nimport SUICoordinator\n\nenum HomeRoute: CaseIterable, TabbarPage {\n  \n  case marketplace\n  case settings\n  \n  // MARK: NavigationRouter\n  \n  func coordinator() -\u003e Coordinator {\n    switch self {\n      case .settings:\n        return SettingsCoordinator()\n      case .marketplace:\n        return MarketplaceCoordinator()\n    }\n  }\n  \n  // MARK: TabbarPageDataSource\n  \n  public var title: String {\n    switch self {\n      case .marketplace:\n        return \"Marketplace\"\n      case .settings:\n        return \"Settings\"\n    }\n  }\n  \n  public var icon: Image {\n    switch self {\n      case .marketplace:\n        return Image(systemName: \"house\")\n      case .settings:\n        return Image(systemName: \"gearshape\")\n    }\n  }\n  \n  public var position: Int {\n    switch self {\n      case .marketplace:\n        return 0\n      case .settings:\n        return 1\n    }\n  }\n}\n```\n\n### 2. Create a TabbarCoordinator\n\n* Default tabbar build with UIKIT (It also works with SwiftUI)\n\n```swift\nimport UIKCoordinator\nimport UIKit\n\nclass HomeCoordinatorUIKit: TabbarCoordinator\u003cHomeRoute\u003e {\n  \n  // MARK: Constructor\n  \n  public init() {\n    super.init(\n      pages: [.marketplace, .settings],\n      currentPage: .marketplace\n    )\n  }\n}\n```\n\n* Custom view (SwiftUI)\n\n```swift\nimport SUICoordinator\nimport SwiftUI\nimport Combine\n\nclass HomeCoordinatorSUI: TabbarCoordinator\u003cHomeRoute\u003e {\n\n  // MARK: Properties\n  \n  var cancelables = Set\u003cAnyCancellable\u003e()\n\n  // Custom Tabbar view\n  public init(currentPage: HomeRoute) {\n    let viewModel = HomeTabbarViewModel()\n    let view = HomeTabbarView(viewModel: viewModel)\n    viewModel.currentPage = currentPage\n\n    super.init(\n      customView: view,\n      pages: [.marketplace, .settings],\n      currentPage: currentPage\n    )\n    \n    viewModel.$currentPage\n      .sink { [weak self] page in\n        self?.currentPage = page\n      }.store(in: \u0026cancelables)\n    \n    UITabBar.appearance().isHidden = true\n  }\n  \n  // Default Tabbar view\n  public init(default: Bool ) {\n    super.init(pages: [.marketplace, .settings])\n  }\n}\n```\n\n### 3. Create MainCoordinator\n\n```swift\nimport SUICoordinator\n\nclass MainCoordinator: NavigationCoordinator\u003cMainRoute\u003e {\n  \n  // MARK: Constructor\n  \n  init() {\n    super.init(parent: nil)\n    router.startFlow(route: .splash, animated: false)\n  }\n  \n  // MARK: Coordinator\n  \n  override func start(animated: Bool = false) {\n    let coordinator = OnboardingCoordinator(presentationStyle: .fullScreen)\n    router.navigate(to: coordinator, animated: animated)\n  }\n}\n```\n\n```swift\nimport SUICoordinator\nimport SwiftUI\n\nenum MainRoute: NavigationRoute {\n  \n  case splash\n\n  // MARK: NavigationRoute\n\n  var transition: NavigationTransitionStyle { .push }\n  func view() -\u003e any View { SplashScreenView() }\n}\n```\n_____\n\n### Setup project\n\n\u003cbr\u003e\n\n1. Create a SceneDelegate class if your app supports scenes:\n\n```swift\nimport SwiftUI\nimport SUICoordinator\n\nfinal class SceneDelegate: NSObject, UIWindowSceneDelegate {\n  \n  var mainCoordinator: MainCoordinator?\n  var window: UIWindow?\n  \n  func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {\n    guard let windowScene = (scene as? UIWindowScene) else { return }\n    window = UIWindow(windowScene: windowScene)\n    setupCoordinator(animated: true)\n  }\n  \n  private func setupCoordinator(animated: Bool = false) {\n    mainCoordinator = .init()\n    setupWindow(controller: mainCoordinator?.root)\n    BaseCoordinator.mainCoordinator = mainCoordinator\n    mainCoordinator?.start(animated: animated)\n  }\n  \n  private func setupWindow(controller: UIViewController?) {\n    window?.rootViewController = controller\n    window?.makeKeyAndVisible()\n  }\n}\n```\n\n\u003cbr\u003e\n\n2. In your app's AppDelegate file, set the SceneDelegate class as the windowScene delegate:\n\n```swift\nimport UIKit\n\n@main\nfinal class AppDelegate: NSObject, UIApplicationDelegate {\n  \n  func application(\n    _ application: UIApplication,\n    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil\n  ) -\u003e Bool {\n    return true\n  }\n  \n  func application(\n    _ application: UIApplication,\n    configurationForConnecting connectingSceneSession: UISceneSession,\n    options: UIScene.ConnectionOptions\n  ) -\u003e UISceneConfiguration {\n    let sessionRole = connectingSceneSession.role\n    let sceneConfig = UISceneConfiguration(name: nil, sessionRole: sessionRole)\n    sceneConfig.delegateClass = SceneDelegate.self\n    return sceneConfig\n  }\n}\n```\n\n#### You can find an example here \u003chttps://github.com/felilo/TestCoordinatorLibrary\u003e\n\n_____\n\n### Features\n\nThese are the most important features and actions that you can perform:\n\u003cbr\u003e\n\n#### Router\n\nThe router is encharge to manage the navigation stack and coordinate the transitions between different views. It abstracts away the navigation details from the views, allowing them to focus on their specific features such as:\n\n\u003cbr\u003e\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eName\u003c/th\u003e\n      \u003cth\u003eParametes\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003enavigate(_)\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\n        \u003cul cellspacing=\"0\" cellpadding=\"0\"\u003e\n          \u003cli\u003e\u003cb\u003eto:\u003c/b\u003e \u003ccode\u003eRoute\u003c/code\u003e,\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003etransitionStyle:\u003c/b\u003e \u003ccode\u003eNavigationTransitionStyle?\u003c/code\u003e, default: \u003ccode style=\"color: #ec6b6f;\"\u003eautomatic\u003c/code\u003e,\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003eanimated:\u003c/b\u003e \u003ccode\u003eBool?\u003c/code\u003e, default \u003ccode style=\"color: #ec6b6f;\"\u003etrue\u003c/code\u003e,\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003ecompletion:\u003c/b\u003e \u003ccode\u003e(() -\u003e Void)?\u003c/code\u003e, default: \u003ccode style=\"color: #ec6b6f;\"\u003enil\u003c/code\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003eAllows you to navigate among the views that were defined in the Route. The types of presentation are Push, Modal, ModalFullScreen and Custom.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003enavigate(_)\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e \n        \u003cul\u003e\n          \u003cli\u003e\u003cb\u003eto:\u003c/b\u003e \u003ccode\u003eCoordinator\u003c/code\u003e\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003eanimated:\u003c/b\u003e \u003ccode\u003eBool?\u003c/code\u003e, default \u003ccode style=\"color: #ec6b6f;\"\u003etrue\u003c/code\u003e,\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003eAllows you to navigate among the Coordinators. It calls the \u003ccode\u003estart()\u003c/code\u003e function.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003estartFlow(_)\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e \n        \u003cul\u003e\n          \u003cli\u003e\u003cb\u003eto:\u003c/b\u003e \u003ccode\u003eRoute\u003c/code\u003e\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003etransitionStyle:\u003c/b\u003e \u003ccode\u003eNavigationTransitionStyle?\u003c/code\u003e, default: \u003ccode style=\"color: #ec6b6f;\"\u003eautomatic\u003c/code\u003e,\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003eanimated:\u003c/b\u003e \u003ccode\u003eBool?\u003c/code\u003e, default \u003ccode style=\"color: #ec6b6f;\"\u003etrue\u003c/code\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003eCleans the navigation stack and runs the navigation flow.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003epresent(_)\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e \n        \u003cul\u003e\n          \u003cli\u003e\u003cb\u003e_ view:\u003c/b\u003e \u003ccode\u003eViewType\u003c/code\u003e\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003eanimated:\u003c/b\u003e \u003ccode\u003eBool?\u003c/code\u003e, default \u003ccode style=\"color: #ec6b6f;\"\u003etrue\u003c/code\u003e,\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003ecompletion:\u003c/b\u003e \u003ccode\u003e(() -\u003e Void)?\u003c/code\u003e, default: \u003ccode style=\"color: #ec6b6f;\"\u003enil\u003c/code\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003ePresents a view modally.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003epop(_)\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e \n        \u003cul\u003e\n          \u003cli\u003e\u003cb\u003eanimated:\u003c/b\u003e \u003ccode\u003eBool?\u003c/code\u003e, default \u003ccode style=\"color: #ec6b6f;\"\u003etrue\u003c/code\u003e,\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003ePops the top view from the navigation stack and updates the display.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003epopToRoot(_)\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e \n        \u003cul\u003e\n          \u003cli\u003e\u003cb\u003eanimated:\u003c/b\u003e \u003ccode\u003eBool?\u003c/code\u003e, default \u003ccode style=\"color: #ec6b6f;\"\u003etrue\u003c/code\u003e,\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003ecompletion:\u003c/b\u003e \u003ccode\u003e(() -\u003e Void)?\u003c/code\u003e, default: \u003ccode style=\"color: #ec6b6f;\"\u003enil\u003c/code\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003ePops all the views on the stack except the root view and updates the display.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003edismiss(_)\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e \n        \u003cul\u003e\n          \u003cli\u003e\u003cb\u003eanimated:\u003c/b\u003e \u003ccode\u003eBool?\u003c/code\u003e, default \u003ccode style=\"color: #ec6b6f;\"\u003etrue\u003c/code\u003e,\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003eDismisses the view that was presented modally by the view.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003epopToView(_)\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e \n        \u003cul\u003e\n          \u003cli\u003e\u003cb\u003e_ view:\u003c/b\u003e \u003ccode\u003eT\u003c/code\u003e\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003eanimated:\u003c/b\u003e \u003ccode\u003eBool?\u003c/code\u003e, default \u003ccode style=\"color: #ec6b6f;\"\u003etrue\u003c/code\u003e,\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003ePops views until the specified view is at the top of the navigation stack. Example: \u003ccode\u003erouter.popToView(MyView.self)\u003c/code\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003efinishFlow(_)\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e \n        \u003cul\u003e\n          \u003cli\u003e\u003cb\u003eanimated:\u003c/b\u003e \u003ccode\u003eBool?\u003c/code\u003e, default \u003ccode style=\"color: #ec6b6f;\"\u003etrue\u003c/code\u003e,\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003ecompletion:\u003c/b\u003e \u003ccode\u003e(() -\u003e Void)?\u003c/code\u003e, default: \u003ccode style=\"color: #ec6b6f;\"\u003enil\u003c/code\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003ePops all the views on the stack including the root view, dismisses all the modal view and remove the current coordinator from the coordinator stack.\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr\u003e\n\n#### NavigationCoordinator\n\nActs as a separate entity from the views, decoupling the navigation logic from the presentation logic. This separation of concerns allows the views to focus solely on their specific functionalities, while the Navigation Coordinator takes charge of the app's overall navigation flow. Some features are:\n\n\u003cbr\u003e\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eName\u003c/th\u003e\n      \u003cth\u003eParametes\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003erouter\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\u0026nbsp;\u003c/td\u003e\n      \u003ctd\u003eVariable of Route type which allow performs action router.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003eforcePresentation(_)\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e \n        \u003cul\u003e\n          \u003cli\u003e\u003cb\u003eroute:\u003c/b\u003e \u003ccode\u003eRoute\u003c/code\u003e\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003etransitionStyle:\u003c/b\u003e \u003ccode\u003eNavigationTransitionStyle?\u003c/code\u003e, default: \u003ccode style=\"color: #ec6b6f;\"\u003eautomatic\u003c/code\u003e,\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003eanimated:\u003c/b\u003e \u003ccode\u003eBool?\u003c/code\u003e, default \u003ccode style=\"color: #ec6b6f;\"\u003etrue\u003c/code\u003e,\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003emainCoordinator:\u003c/b\u003e \u003ccode\u003eCoordinator?\u003c/code\u003e, default: \u003ccode style=\"color: #ec6b6f;\"\u003emainCoordinator\u003c/code\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003ePuts the current coordinator at the top of the coordinator stack, making it the active and visible coordinator. This feature is very useful to start the navigation flow from push notifications, notification center, atypical flows, etc.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003egetTopCoordinator(_)\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e \n        \u003cul\u003e\n          \u003cli\u003e\u003cb\u003emainCoordinator:\u003c/b\u003e \u003ccode\u003eCoordinator?\u003c/code\u003e, default \u003ccode style=\"color: #ec6b6f;\"\u003emainCoordinator\u003c/code\u003e,\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003eReturns the coordinator that is at the top of the coordinator stack.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003erestartApp(_)\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e \n        \u003cul\u003e\n          \u003cli\u003e\u003cb\u003emainCoordinator:\u003c/b\u003e \u003ccode\u003eCoordinator?\u003c/code\u003e, default \u003ccode style=\"color: #ec6b6f;\"\u003emainCoordinator\u003c/code\u003e,\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003eanimated:\u003c/b\u003e \u003ccode\u003eBool?\u003c/code\u003e, default \u003ccode style=\"color: #ec6b6f;\"\u003etrue\u003c/code\u003e,\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003ecompletion:\u003c/b\u003e \u003ccode\u003e(() -\u003e Void)?\u003c/code\u003e, default: \u003ccode style=\"color: #ec6b6f;\"\u003enil\u003c/code\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003eCleans the navigation stack and runs the main coordinator navigation flow.\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003cbr\u003e\n\n#### TabbarCoordinator\n\nActs as a separate entity from the views, decoupling the navigation logic from the presentation logic. This separation of concerns allows the views to focus solely on their specific functionalities, while the Navigation Coordinator takes charge of the app's overall navigation flow. It is encharge if build the tab bar (UITabbarController) with the coordinators that were defined in its route, some features are:\n\n\u003cbr\u003e\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003cth\u003eName\u003c/th\u003e\n      \u003cth\u003eParametes\u003c/th\u003e\n      \u003cth\u003eDescription\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003ecurrentPage\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e\u0026nbsp;\u003c/td\u003e\n      \u003ctd\u003e Returns the current page selected.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003egetCoordinatorSelected()\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e \n        \u003cul\u003e\n          \u003cli\u003e\u003cb\u003emainCoordinator:\u003c/b\u003e \u003ccode\u003eCoordinator?\u003c/code\u003e, default \u003ccode style=\"color: #ec6b6f;\"\u003emainCoordinator\u003c/code\u003e,\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003eReturns the coordinator selected that is associated to the selected tab\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003esetPages(_)\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e \n        \u003cul\u003e\n          \u003cli\u003e\u003cb\u003e_values:\u003c/b\u003e \u003ccode\u003e[PAGE]?\u003c/code\u003e, default \u003ccode style=\"color: #ec6b6f;\"\u003emainCoordinator\u003c/code\u003e,\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003ecompletion:\u003c/b\u003e \u003ccode\u003e(() -\u003e Void)?\u003c/code\u003e, default: \u003ccode style=\"color: #ec6b6f;\"\u003enil\u003c/code\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003eUpdates the page set.\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003ccode style=\"color: blue;\"\u003eforcePresentation(_)\u003c/code\u003e\u003c/td\u003e\n      \u003ctd\u003e \n        \u003cul\u003e\n          \u003cli\u003e\u003cb\u003eanimated:\u003c/b\u003e \u003ccode\u003eBool?\u003c/code\u003e, default \u003ccode style=\"color: #ec6b6f;\"\u003etrue\u003c/code\u003e,\u003c/li\u003e\n          \u003cli\u003e\u003cb\u003emainCoordinator:\u003c/b\u003e \u003ccode\u003eCoordinator?\u003c/code\u003e, default: \u003ccode style=\"color: #ec6b6f;\"\u003emainCoordinator\u003c/code\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/td\u003e\n      \u003ctd\u003ePuts the current coordinator at the top of the coordinator stack, making it the active and visible coordinator. This feature is very useful to start the navigation flow from push notifications, notification center, atypical flows, etc.\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n_____\n\n### Installation 💾\n\nSPM\n\nOpen Xcode and your project, click File / Swift Packages / Add package dependency... . In the textfield \"Enter package repository URL\", write \u003chttps://github.com/felilo/ALCoordinator\u003e and press Next twice\n_____\n\n## Contributing\n\nContributions to the ALCoordinator library are welcome! To contribute, simply fork this repository and make your changes in a new branch. When your changes are ready, submit a pull request to this repository for review.\n\nLicense\n\nThe ALCoordinator library is released under the MIT license. See the LICENSE file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelilo%2Falcoordinator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelilo%2Falcoordinator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelilo%2Falcoordinator/lists"}