From ed28691e4cce834ff5d3b6ed757a3387d2aa449a Mon Sep 17 00:00:00 2001 From: Jeroen Leenarts Date: Sat, 26 May 2018 09:41:09 +0200 Subject: [PATCH] Some casing trouble in WireGuard strings. Signed-off-by: Jason A. Donenfeld --- .../TunnelConfigurationTableViewController.swift | 15 ++++++++++++--- Wireguard.xcodeproj/project.pbxproj | 6 +++--- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/WireGuard/ViewControllers/TunnelConfigurationTableViewController.swift b/WireGuard/ViewControllers/TunnelConfigurationTableViewController.swift index ef93536..271b7ae 100644 --- a/WireGuard/ViewControllers/TunnelConfigurationTableViewController.swift +++ b/WireGuard/ViewControllers/TunnelConfigurationTableViewController.swift @@ -3,7 +3,7 @@ // WireGuard // // Created by Jeroen Leenarts on 24-05-18. -// Copyright © 2018 Wireguard. All rights reserved. +// Copyright © 2018 WireGuard. All rights reserved. // import UIKit @@ -17,12 +17,21 @@ class TunnelConfigurationTableViewController: UITableViewController { var viewContext: NSManagedObjectContext! weak var delegate: TunnelConfigurationTableViewControllerDelegate? - override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + override func numberOfSections(in tableView: UITableView) -> Int { return 3 } + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + switch section { + case 1: + return 2 + default: + return 1 + } + } + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - switch indexPath.row { + switch indexPath.section { case 0: return tableView.dequeueReusableCell(type: InterfaceTableViewCell.self, for: indexPath) case 1: diff --git a/Wireguard.xcodeproj/project.pbxproj b/Wireguard.xcodeproj/project.pbxproj index f814b8a..1d9466e 100644 --- a/Wireguard.xcodeproj/project.pbxproj +++ b/Wireguard.xcodeproj/project.pbxproj @@ -100,7 +100,7 @@ isa = PBXGroup; children = ( 4A4BAD0720B5F4BC00F12B28 /* Resources */, - 4A4BACE420B5F1BF00F12B28 /* Wireguard */, + 4A4BACE420B5F1BF00F12B28 /* WireGuard */, 4A4BACF920B5F1C100F12B28 /* WireguardTests */, 4A4BACE320B5F1BF00F12B28 /* Products */, 87B9E27C2D1820573644527C /* Pods */, @@ -117,7 +117,7 @@ name = Products; sourceTree = ""; }; - 4A4BACE420B5F1BF00F12B28 /* Wireguard */ = { + 4A4BACE420B5F1BF00F12B28 /* WireGuard */ = { isa = PBXGroup; children = ( 4A4BAD1420B5F8C000F12B28 /* Models */, @@ -129,7 +129,7 @@ 4A4BACEE20B5F1C100F12B28 /* LaunchScreen.storyboard */, 4A4BACF120B5F1C100F12B28 /* Info.plist */, ); - path = Wireguard; + path = WireGuard; sourceTree = ""; }; 4A4BACF920B5F1C100F12B28 /* WireguardTests */ = {