aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/iOS/MainViewController.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-10-13 07:08:30 +0530
committerRoopesh Chander <roop@roopc.net>2018-10-27 15:13:01 +0530
commit5fe60a8befee74a5e08202647ce5d2c4a2c86cc6 (patch)
tree19177243caa81a39bc0529d5c7af708f62b64b01 /WireGuard/WireGuard/UI/iOS/MainViewController.swift
parentMove UI code into a separate platform-specific folder (diff)
downloadwireguard-apple-5fe60a8befee74a5e08202647ce5d2c4a2c86cc6.tar.xz
wireguard-apple-5fe60a8befee74a5e08202647ce5d2c4a2c86cc6.zip
Use a split-view controller as the main (root) view controller
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuard/UI/iOS/MainViewController.swift12
1 files changed, 10 insertions, 2 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/MainViewController.swift b/WireGuard/WireGuard/UI/iOS/MainViewController.swift
index a296b5f..4672c27 100644
--- a/WireGuard/WireGuard/UI/iOS/MainViewController.swift
+++ b/WireGuard/WireGuard/UI/iOS/MainViewController.swift
@@ -8,8 +8,16 @@
import UIKit
-class MainViewController: UIViewController {
+class MainViewController: UISplitViewController {
override func loadView() {
- self.view = UIView()
+ let detailVC = UIViewController()
+ let detailNC = UINavigationController(rootViewController: detailVC)
+
+ let masterVC = TunnelsListTableViewController()
+ let masterNC = UINavigationController(rootViewController: masterVC)
+
+ self.viewControllers = [ masterNC, detailNC ]
+
+ super.loadView()
}
}