summaryrefslogtreecommitdiff
path: root/SmartDeviceLink-ExampleSwift/ConnectionTCPTableViewController.swift
diff options
context:
space:
mode:
authorBrettyWhite <geekman3454@protonmail.com>2017-05-15 17:09:35 -0400
committerBrettyWhite <geekman3454@protonmail.com>2017-05-15 17:09:35 -0400
commitdbaf4ac42a9b8aacbed406ad5246cc4d8195e65a (patch)
treebce9edb200f09fb6aab84a3b657942148f2514e6 /SmartDeviceLink-ExampleSwift/ConnectionTCPTableViewController.swift
parent881bd5f9649713494439e518fa8aa63dd42b5102 (diff)
downloadsdl_ios-dbaf4ac42a9b8aacbed406ad5246cc4d8195e65a.tar.gz
cleaning up for a nice start tomorrow
Diffstat (limited to 'SmartDeviceLink-ExampleSwift/ConnectionTCPTableViewController.swift')
-rw-r--r--SmartDeviceLink-ExampleSwift/ConnectionTCPTableViewController.swift28
1 files changed, 25 insertions, 3 deletions
diff --git a/SmartDeviceLink-ExampleSwift/ConnectionTCPTableViewController.swift b/SmartDeviceLink-ExampleSwift/ConnectionTCPTableViewController.swift
index 72e1d985b..00b955b2c 100644
--- a/SmartDeviceLink-ExampleSwift/ConnectionTCPTableViewController.swift
+++ b/SmartDeviceLink-ExampleSwift/ConnectionTCPTableViewController.swift
@@ -2,7 +2,7 @@
// ConnectionTCPTableViewController.swift
// SmartDeviceLink-ExampleSwift
//
-// Created by Brett McIsaac on 5/15/17.
+// Created by Bretty White on 5/15/17.
// Copyright © 2017 smartdevicelink. All rights reserved.
//
@@ -22,9 +22,31 @@ class ConnectionTCPTableViewController: UITableViewController, UIImagePickerCont
tableView.keyboardDismissMode = .onDrag
ipAddressTextField.text = UserDefaults.standard.string(forKey: "ipAddress")
portTextField.text = UserDefaults.standard.string(forKey: "port")
- // Connect Button setup
- connectButton.tintColor = UIColor.white
}
+ override func didReceiveMemoryWarning() {
+ super.didReceiveMemoryWarning()
+ // Dispose of any resources that can be recreated.
+ }
+ // MARK: - IBActions
+ @IBAction func connectButtonWasPressed(_ sender: UIButton) {
+
+ }
+
+ // MARK: - Table view delegate
+ override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+ if indexPath.section != 0 {
+ return
+ }
+ switch indexPath.row {
+ case 0:
+ ipAddressTextField.becomeFirstResponder()
+ case 1:
+ portTextField.becomeFirstResponder()
+ default:
+ break
+ }
+
+ }
}