aboutsummaryrefslogtreecommitdiffstats
path: root/Wireguard/Coordinators/RootCoordinator.swift
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Wireguard/Coordinators/RootCoordinator.swift19
1 files changed, 19 insertions, 0 deletions
diff --git a/Wireguard/Coordinators/RootCoordinator.swift b/Wireguard/Coordinators/RootCoordinator.swift
new file mode 100644
index 0000000..0319fef
--- /dev/null
+++ b/Wireguard/Coordinators/RootCoordinator.swift
@@ -0,0 +1,19 @@
+//
+// RootCoordinator.swift
+// Wireguard
+//
+// Created by Jeroen Leenarts on 23-05-18.
+// Copyright © 2018 Wireguard. All rights reserved.
+//
+
+import Foundation
+import UIKit
+
+public protocol RootViewControllerProvider: class {
+ // The coordinators 'rootViewController'. It helps to think of this as the view
+ // controller that can be used to dismiss the coordinator from the view hierarchy.
+ var rootViewController: UIViewController { get }
+}
+
+/// A Coordinator type that provides a root UIViewController
+public typealias RootViewCoordinator = Coordinator & RootViewControllerProvider