Swiftpack.co - GSM-MSG/Moordinator as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by GSM-MSG.
GSM-MSG/Moordinator 2.2.0
👣Navigation framework for iOS applications based on a Coordinator pattern with Combine
⭐️ 5
🕓 40 weeks ago
iOS
.package(url: "https://github.com/GSM-MSG/Moordinator.git", from: "2.2.0")

Moordinator

Navigation framework for iOS applications based on a Coordinator pattern

Document


Constents

Requirements

  • iOS 13.0+
  • Swift 5+

Overview

Navigation framework for iOS applications based on a Coordinator pattern


Communication

  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

Installation

Swift Package Manager

Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

To integrate Moordinator into your Xcode project using Swift Package Manager, add it to the dependencies value of your Package.swift:

dependencies: [
    .package(url: "https://github.com/GSM-MSG/Moordinator.git", .upToNextMajor(from: "2.0.0"))
]

Manually

If you prefer not to use either of the aforementioned dependency managers, you can integrate Moordinator into your project manually.


Usage

Quick Start

// create a path
import Moordinator

enum ExRoutePath: RoutePath {
    case main
}
// create a moordinator
import Moordinator
import Combine
import UIKit

final class MainMoordinator: Moordinator {
    private let rootVC = UINavigationController()

    var root: Presentable {
        rootVC
    }

    // navigation
    func route(to path: RoutePath) -> MoordinatorContributors {
        guard let path = path as? ExRoutePath else { return .none }
        switch path {
          case .main:
              let vc = UIViewController()
              rootVC.setViewControllers([vc], animated: true)
              return .one(.contribute(withNextPresentable: vc, withNextRouter: vc))
        }
        return .none
    }
}

More

GitHub

link
Stars: 5
Last commit: 41 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

2.2.0 Moordinator
41 weeks ago

Added

RoutePath로서의 의미가 없는 NoneRoutePath가 추가되었습니다

Full Changelog: https://github.com/GSM-MSG/Moordinator/compare/2.1.0...2.2.0

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics