diff options
author | BrettyWhite <geekman3454@protonmail.com> | 2017-05-22 11:51:33 -0400 |
---|---|---|
committer | BrettyWhite <geekman3454@protonmail.com> | 2017-05-22 11:51:33 -0400 |
commit | d2d0417d0e3ecead75a6ace67038fb5c35231ea2 (patch) | |
tree | fc8f8ede126e3f45a0a7d0b08478bdb42718d697 /SmartDeviceLink-ExampleSwift/ConnectionTCPTableViewController.swift | |
parent | 4826b8cdf89662b5e087d9d5083ca164218b4a29 (diff) | |
download | sdl_ios-feature/Hello_SDL_Swift.tar.gz |
changing to fit swift3 design patternfeature/Hello_SDL_Swift
Diffstat (limited to 'SmartDeviceLink-ExampleSwift/ConnectionTCPTableViewController.swift')
-rw-r--r-- | SmartDeviceLink-ExampleSwift/ConnectionTCPTableViewController.swift | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/SmartDeviceLink-ExampleSwift/ConnectionTCPTableViewController.swift b/SmartDeviceLink-ExampleSwift/ConnectionTCPTableViewController.swift index c4928ac0f..3d2e225ba 100644 --- a/SmartDeviceLink-ExampleSwift/ConnectionTCPTableViewController.swift +++ b/SmartDeviceLink-ExampleSwift/ConnectionTCPTableViewController.swift @@ -16,7 +16,7 @@ class ConnectionTCPTableViewController: UITableViewController, UINavigationContr @IBOutlet weak var connectButton: UIButton! @IBOutlet weak var table: UITableView! - var state: ProxyState = ProxyState.Stopped + var state: ProxyState = ProxyState.stopped override func viewDidLoad() { super.viewDidLoad() @@ -54,11 +54,11 @@ class ConnectionTCPTableViewController: UITableViewController, UINavigationContr // Initialize (or reset) the SDL manager switch state { - case ProxyState.Stopped: + case ProxyState.stopped: ProxyManager.sharedManager.startTCP() - case ProxyState.Searching: + case ProxyState.searching: ProxyManager.sharedManager.reset() - case ProxyState.Connected: + case ProxyState.connected: ProxyManager.sharedManager.reset() } }else{ @@ -76,13 +76,13 @@ class ConnectionTCPTableViewController: UITableViewController, UINavigationContr var newTitle: String? = nil switch newState { - case .Stopped: + case .stopped: newColor = UIColor.red newTitle = "Connect" - case .Searching: + case .searching: newColor = UIColor.blue newTitle = "Stop Searching" - case .Connected: + case .connected: newColor = UIColor.green newTitle = "Disconnect" } |