Skip to content

🗺️ CombineFlow is a navigation framework for iOS applications based on a Reactive Flow Coordinator pattern inspired by RxFlow

Notifications You must be signed in to change notification settings

baekteun/CombineFlow

Repository files navigation

CombineFlow

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

CombineFlow is inspired RxFlow


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 CombineFlow into your Xcode project using Swift Package Manager, add it to the dependencies value of your Package.swift:

dependencies: [
    .package(url: "https://github.com/baekteun/CombineFlow.git", .upToNextMajor(from: "1.0.0"))
]

Manually

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


Usage

Quick Start

// create a path
import CombineFlow

enum ExStep: Step {
    case main
}
// create a flow
import CombineFlow
import Combine
import UIKit

final class MainFlow: Flow {
    private let rootVC = UINavigationController()

    var root: Presentable {
        rootVC
    }

    // navigation
    func navigate(to step: any Step) -> FlowContributors {
        guard let step = step as? ExStep else { return .none }
        switch step {
          case .main:
              let vc = StepperViewController()
              rootVC.setViewControllers([vc], animated: true)
              return .one(.contribute(withNextPresentable: vc, withNextStepper: vc))
        }
        return .none
    }
}

About

🗺️ CombineFlow is a navigation framework for iOS applications based on a Reactive Flow Coordinator pattern inspired by RxFlow

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages