summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2018-09-18 14:27:06 -0400
committerJoel Fischer <joeljfischer@gmail.com>2018-09-18 14:27:06 -0400
commit9411a848803c053309b6d98f407088455ee7ed65 (patch)
tree4d3afa60a79e4d9f2320aae915dcab2ae788a93f
parent72114f39bdc52c0d0cae9d3fba45d01489b2e2d6 (diff)
downloadsdl_ios-feature/issue_246_play_pause_enum.tar.gz
Add documentation to SDLButtonNameOkfeature/issue_246_play_pause_enum
-rw-r--r--Example Apps/Example ObjC/ProxyManager.m12
-rw-r--r--SmartDeviceLink/SDLButtonName.h2
2 files changed, 3 insertions, 11 deletions
diff --git a/Example Apps/Example ObjC/ProxyManager.m b/Example Apps/Example ObjC/ProxyManager.m
index 8e752c171..317b9cb92 100644
--- a/Example Apps/Example ObjC/ProxyManager.m
+++ b/Example Apps/Example ObjC/ProxyManager.m
@@ -161,19 +161,11 @@ NS_ASSUME_NONNULL_BEGIN
- (void)sdlex_showInitialData {
if (![self.sdlManager.hmiLevel isEqualToEnum:SDLHMILevelFull]) { return; }
-// SDLSetDisplayLayout *setDisplayLayout = [[SDLSetDisplayLayout alloc] initWithPredefinedLayout:SDLPredefinedLayoutNonMedia];
-// [self.sdlManager sendRequest:setDisplayLayout];
+ SDLSetDisplayLayout *setDisplayLayout = [[SDLSetDisplayLayout alloc] initWithPredefinedLayout:SDLPredefinedLayoutNonMedia];
+ [self.sdlManager sendRequest:setDisplayLayout];
[self sdlex_updateScreen];
self.sdlManager.screenManager.softButtonObjects = [self.buttonManager allScreenSoftButtons];
-
- SDLSubscribeButton *subscribeOk = [[SDLSubscribeButton alloc] initWithButtonName:SDLButtonNamePlayPause handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) {
- NSLog(@"OK PRESSED");
- }];
-
- [self.sdlManager sendRequest:subscribeOk withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) {
- NSLog(@"OK Request: %@, response: %@, error: %@", request, response, error);
- }];
}
- (nullable RefreshUIHandler)refreshUIHandler {
diff --git a/SmartDeviceLink/SDLButtonName.h b/SmartDeviceLink/SDLButtonName.h
index 32865637c..cb767ef35 100644
--- a/SmartDeviceLink/SDLButtonName.h
+++ b/SmartDeviceLink/SDLButtonName.h
@@ -16,7 +16,7 @@
typedef SDLEnum SDLButtonName SDL_SWIFT_ENUM;
/**
- * Represents the button usually labeled "OK". A typical use of this button is for the user to press it to make a selection.
+ * Represents the button usually labeled "OK". A typical use of this button is for the user to press it to make a selection. Prior to SDL Core 5.0 (iOS Proxy v.6.1), Ok was used for both "OK" buttons *AND* PlayPause. In 5.0, PlayPause was introduced to reduce confusion, and you should use the one you intend for your use case (usually PlayPause). Until the next proxy breaking change, however, subscribing to this button name will continue to subscribe you to PlayPause so that your code does not break. That means that if you subscribe to both Ok and PlayPause, you will receive duplicate notifications.
*/
extern SDLButtonName const SDLButtonNameOk;