diff options
Diffstat (limited to 'WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift')
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift | 10 |
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) } } ) |