From 05b9d6972b99750882371dcb04dabe38486b6f79 Mon Sep 17 00:00:00 2001 From: Roopesh Chander Date: Thu, 25 Oct 2018 11:10:18 +0530 Subject: Import: Support for opening a .conf file in the app Signed-off-by: Roopesh Chander --- WireGuard/WireGuard/UI/iOS/MainViewController.swift | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'WireGuard/WireGuard/UI/iOS/MainViewController.swift') 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 { -- cgit v1.2.3-59-g8ed1b