Coordinator chain responsability
- iOS 11.0+
- Xcode 10.0+
Swift Package Manager
To use CoordinatorKit as a Swift Package Manager package just add the following in your Package.swift file.
// swift-tools-version:4.1
import PackageDescription
let package = Package(
name: "HelloCoordinatorKit",
dependencies: [
.package(url: "https://github.com/bfernandesbfs/CoordinatorKit.git", .upToNextMajor(from: "1.0.0"))
],
targets: [
.target(name: "HelloCoordinatorKit", dependencies: ["CoordinatorKit"])
]
)
- Copy files
Source/Core
directory to yours project.
Add import CoordinatorKit
and use Coordinator
protocol to implement the objects needed into your class
import CoordinatorKit
final class AppCoordinator: Coordinator {
var rootViewController: UINavigationController
init() {
rootViewController = UINavigationController()
}
}
CoordinatorKit
have an resource to presenting:
- ViewTrasition
- NavigationViewTransition
- TabBarViewTransition
to use:
let controller = MyViewController()
router(ViewTransition.present(controller)) {
print("End trasition")
}
Issues and pull requests are welcome!
See Contributing for details.
Bruno Fernandes @bfernandesbfs
CoordinatorKit is released under the MIT license. See LICENSE for details.