aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-10-23 17:23:46 +0530
committerRoopesh Chander <roop@roopc.net>2018-10-27 15:13:01 +0530
commit05efb453f3825415d6dbd9f6cc8e6adfaafc4fc2 (patch)
tree1939f32265e7c81ca66aaac5a069a11afc1a6856 /WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift
parentModel: Use DNSServer in the Configuration model (diff)
downloadwireguard-apple-05efb453f3825415d6dbd9f6cc8e6adfaafc4fc2.tar.xz
wireguard-apple-05efb453f3825415d6dbd9f6cc8e6adfaafc4fc2.zip
Tunnel creation: Saving a configuration
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift')
-rw-r--r--WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift10
1 files changed, 5 insertions, 5 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift
index d58da27..f13a900 100644
--- a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift
+++ b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift
@@ -40,11 +40,11 @@ class TunnelsListTableViewController: UITableViewController {
message: "Add a tunnel",
preferredStyle: .actionSheet)
alert.addAction(
- UIAlertAction(title: "Create from scratch", style: .default) { (action) in
- let editVC = TunnelEditTableViewController()
- let editNC = UINavigationController(rootViewController: editVC)
- self.present(editNC, animated: true) {
- print("Done")
+ UIAlertAction(title: "Create from scratch", style: .default) { [weak self] (action) in
+ if let s = self, let tunnelsManager = s.tunnelsManager {
+ let editVC = TunnelEditTableViewController(tunnelsManager: tunnelsManager)
+ let editNC = UINavigationController(rootViewController: editVC)
+ s.present(editNC, animated: true)
}
}
)