diff options
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 { |