From dbaf4ac42a9b8aacbed406ad5246cc4d8195e65a Mon Sep 17 00:00:00 2001 From: BrettyWhite Date: Mon, 15 May 2017 17:09:35 -0400 Subject: cleaning up for a nice start tomorrow --- .../ConnectionTCPTableViewController.swift | 28 +++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'SmartDeviceLink-ExampleSwift/ConnectionTCPTableViewController.swift') 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 + } + + } } -- cgit v1.2.1