aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2018-10-13 07:08:30 +0530
committerRoopesh Chander <roop@roopc.net>2018-10-27 15:13:01 +0530
commit5fe60a8befee74a5e08202647ce5d2c4a2c86cc6 (patch)
tree19177243caa81a39bc0529d5c7af708f62b64b01 /WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift
parentMove UI code into a separate platform-specific folder (diff)
downloadwireguard-apple-5fe60a8befee74a5e08202647ce5d2c4a2c86cc6.tar.xz
wireguard-apple-5fe60a8befee74a5e08202647ce5d2c4a2c86cc6.zip
Use a split-view controller as the main (root) view controller
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r--WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift35
1 files changed, 35 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift
new file mode 100644
index 0000000..e886e4a
--- /dev/null
+++ b/WireGuard/WireGuard/UI/iOS/TunnelsListTableViewController.swift
@@ -0,0 +1,35 @@
+//
+// TunnelsListTableViewController.swift
+// WireGuard
+//
+// Created by Roopesh Chander on 12/10/18.
+// Copyright © 2018 Roopesh Chander. All rights reserved.
+//
+
+import UIKit
+
+class TunnelsListTableViewController: UITableViewController {
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ self.title = "WireGuard"
+ let addButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(addButtonTapped(sender:)))
+ self.navigationItem.rightBarButtonItem = addButtonItem
+ }
+
+ @objc func addButtonTapped(sender: UIBarButtonItem!) {
+ print("Add button tapped")
+ }
+}
+
+// MARK: UITableViewDataSource
+
+extension TunnelsListTableViewController {
+ override func numberOfSections(in tableView: UITableView) -> Int {
+ return 0
+ }
+
+ override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+ return 0
+ }
+}