Latest 1.1.0
Homepage https://github.com/appfoundry/direkt
License MIT
Platforms ios 8.0, requires ARC
Authors , , ,

Direkt


Direkt


Carthage

Direkt is a Swift port of DRYNavigationManager.

Like the original, it is meant for projects which do not rely on Storyboard segues, providing separation of navigation and view controller logic code.
It follows same architectural concept, but leverages Swift programming techniques to provide more type safety and native API feel.

Usage

Library defines a few core protocols that the users will be working with:

  • Navigator – Core objects responsible for navigation flow. Their task is to run the transition code e.g. pushing a view controller onto the navigation stack.
  • NavigationManager – The task of those objects, as the name suggests, is to manage navigators. Meaning the object will need to create given navigator instance upon navigation request. BaseNavigationManager is an open implementaion of the protocol that you can use directly or extend.
  • Few other helper types like ViewControllerFactory, NavigatorFactory which serve as abstraction for dependencies resolution.

Example implementation of Navigator pushing a view controller onto the navigation stack:

func navigate(using input: String, from hostViewController: UIViewController, factory: ViewControllerFactory) throws {
    guard let navigationController = hostViewController.navigationController else {
        throw Error.missingNavigationController
    }

    try navigationController.pushViewController(
        factory.makeViewController(ofType: HelloViewController.self, input: input),
        animated: true
    )
}

Example

In the repository you can find example project.

  1. Clone the repository – git clone https://github.com/appfoundry/direkt.git
  2. Run carthage build --platform iOS from the Example directory
  3. Explore the example project

Installation

CocoaPods

Add the line pod "Direkt" to your Podfile

Carthage

Add the line github "appfoundry/direkt" to your Cartfile and update your Carthage copy-frameworks script accordingly.

Authors

Author E-mail
Joris Dubois [email protected]
Jonathan Esposito [email protected]
Jens Goeman [email protected]
Damian Malarczyk [email protected]

License

Direkt is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Direkt",
    "version": "1.1.0",
    "summary": "Navigation manager to separate navigation logic from your core app code, when not using Storyboard segues.",
    "description": "This is a Swift port of [DRYNavigationManager](https://github.com/appfoundry/DRYNavigationManager)nnLike the original, it is meant for projects which do not rely on Storyboard segues, providing separation of navigation and view controller logic code.nnIt follows same architectural concept, but leverages Swift programming techniques to provide more type safety and native API feel.",
    "homepage": "https://github.com/appfoundry/direkt",
    "license": "MIT",
    "authors": {
        "Joris Dubois": "[email protected]",
        "Jonathan Esposito": "[email protected]",
        "Jens Goeman": "[email protected]",
        "Damian Malarczyk": "[email protected]"
    },
    "source": {
        "git": "https://github.com/appfoundry/direkt.git",
        "tag": "1.1.0"
    },
    "social_media_url": "https://twitter.com/appfoundrybe",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Direkt/**/*.swift",
    "swift_version": "4.1"
}

Pin It on Pinterest

Share This