From 12abbe7e6ea257fa1686a2ef24fbf12009adcb8d Mon Sep 17 00:00:00 2001 From: Nicholas Tay Date: Mon, 21 Mar 2022 15:13:23 +1100 Subject: First try at implementing coordinator pattern Resources: - https://www.hackingwithswift.com/articles/71/how-to-use-the-coordinator-pattern-in-ios-apps --- foray/Coordinator.swift | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 foray/Coordinator.swift (limited to 'foray/Coordinator.swift') diff --git a/foray/Coordinator.swift b/foray/Coordinator.swift new file mode 100644 index 0000000..db97a1d --- /dev/null +++ b/foray/Coordinator.swift @@ -0,0 +1,19 @@ +// +// Coordinator.swift +// foray +// +// Created by Nicholas Tay on 21/3/2022. +// Based on code from Paul Hudson on Hacking with Swift +// (https://www.hackingwithswift.com/articles/71/how-to-use-the-coordinator-pattern-in-ios-apps) +// + +import Foundation +import UIKit + +protocol Coordinator { + var childCoordinators: [Coordinator] { get set } + var navigationController: UINavigationController { get set } + + func start() +} + -- cgit