diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2017-01-26 13:35:35 -0500 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2017-01-26 13:35:35 -0500 |
commit | 0511464160dd539b58961fc85516ab76e2bbeb81 (patch) | |
tree | 84f98fa4488e5c0341b1b9daa906d4648e745c7b | |
parent | cc755a3c684583ca9da98da60c52d8b8e24e31dd (diff) | |
download | sdl_ios-0511464160dd539b58961fc85516ab76e2bbeb81.tar.gz |
Don’t auto-reconnect in example project
##### Example Project
* Fix not properly updating proxy state
* Fix connect button not properly updating
-rw-r--r-- | SmartDeviceLink_Example/Classes/ConnectionTCPTableViewController.m | 6 | ||||
-rw-r--r-- | SmartDeviceLink_Example/Classes/ProxyManager.m | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/SmartDeviceLink_Example/Classes/ConnectionTCPTableViewController.m b/SmartDeviceLink_Example/Classes/ConnectionTCPTableViewController.m index 330e87287..7861bb321 100644 --- a/SmartDeviceLink_Example/Classes/ConnectionTCPTableViewController.m +++ b/SmartDeviceLink_Example/Classes/ConnectionTCPTableViewController.m @@ -122,10 +122,10 @@ default: break; } - if (newColor && newTitle) { + if (newColor || newTitle) { dispatch_async(dispatch_get_main_queue(), ^{ - self.connectTableViewCell.backgroundColor = newColor; - self.connectButton.titleLabel.text = newTitle; + [self.connectTableViewCell setBackgroundColor:newColor]; + [self.connectButton setTitle:newTitle forState:UIControlStateNormal]; }); } } diff --git a/SmartDeviceLink_Example/Classes/ProxyManager.m b/SmartDeviceLink_Example/Classes/ProxyManager.m index 6f1caec86..7096f4bd9 100644 --- a/SmartDeviceLink_Example/Classes/ProxyManager.m +++ b/SmartDeviceLink_Example/Classes/ProxyManager.m @@ -15,7 +15,7 @@ NSString *const SDLAppId = @"9999"; NSString *const PointingSoftButtonArtworkName = @"PointingSoftButtonIcon"; NSString *const MainGraphicArtworkName = @"MainArtwork"; -BOOL const ShouldRestartOnDisconnect = YES; +BOOL const ShouldRestartOnDisconnect = NO; typedef NS_ENUM(NSUInteger, SDLHMIFirstState) { SDLHMIFirstStateNone, @@ -110,6 +110,7 @@ NS_ASSUME_NONNULL_BEGIN } - (void)reset { + [self sdlex_updateProxyState:ProxyStateStopped]; [self.sdlManager stop]; } |