diff options
author | Roopesh Chander <roop@roopc.net> | 2018-10-25 11:10:18 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2018-10-27 15:13:02 +0530 |
commit | 05b9d6972b99750882371dcb04dabe38486b6f79 (patch) | |
tree | 138f31a74240bcb2a0b8019c77197c6c920ff02b /WireGuard/WireGuard/UI/iOS/MainViewController.swift | |
parent | Tunnel editing: Separate init for creation and modification (diff) | |
download | wireguard-apple-05b9d6972b99750882371dcb04dabe38486b6f79.tar.xz wireguard-apple-05b9d6972b99750882371dcb04dabe38486b6f79.zip |
Import: Support for opening a .conf file in the app
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/MainViewController.swift | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/MainViewController.swift b/WireGuard/WireGuard/UI/iOS/MainViewController.swift index 95f1cb9..be90eca 100644 --- a/WireGuard/WireGuard/UI/iOS/MainViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/MainViewController.swift @@ -4,6 +4,8 @@ import UIKit class MainViewController: UISplitViewController { + var tunnelsListVC: TunnelsListTableViewController? + override func loadView() { let detailVC = UIViewController() let detailNC = UINavigationController(rootViewController: detailVC) @@ -14,6 +16,8 @@ class MainViewController: UISplitViewController { self.viewControllers = [ masterNC, detailNC ] super.loadView() + + tunnelsListVC = masterVC } override func viewDidLoad() { @@ -22,6 +26,10 @@ class MainViewController: UISplitViewController { // On iPad, always show both masterVC and detailVC, even in portrait mode, like the Settings app self.preferredDisplayMode = .allVisible } + + func openForEditing(configFileURL: URL) { + tunnelsListVC?.openForEditing(configFileURL: configFileURL) + } } extension MainViewController: UISplitViewControllerDelegate { |