diff options
author | Justin Beharry <justin.beharry@livio.io> | 2022-08-03 12:55:53 -0400 |
---|---|---|
committer | Justin Beharry <justin.beharry@livio.io> | 2022-08-03 12:55:53 -0400 |
commit | 8c7f2d68075a74f20093c7fb0bb6b2a54ff3457c (patch) | |
tree | efd514e8d719d2217de3b95fa66742b81fd36e87 /Example Apps | |
parent | fa8ede06c90855d6bbff6c35771fb31fa52330c9 (diff) | |
download | sdl_ios-8c7f2d68075a74f20093c7fb0bb6b2a54ff3457c.tar.gz |
Make get buttons into a variable and create a getter
Diffstat (limited to 'Example Apps')
-rw-r--r-- | Example Apps/Example ObjC/RemoteControlManager.m | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Example Apps/Example ObjC/RemoteControlManager.m b/Example Apps/Example ObjC/RemoteControlManager.m index d30cb9ad7..ef9f8efd9 100644 --- a/Example Apps/Example ObjC/RemoteControlManager.m +++ b/Example Apps/Example ObjC/RemoteControlManager.m @@ -35,6 +35,7 @@ @property (strong, nonatomic) NSNumber<SDLBool> *hasConsent; @property (strong, nonatomic) SDLClimateControlData *climateData; @property (copy, nonatomic, readwrite) NSString *climateDataString; +@property (strong, nonatomic, readonly) NSArray<SDLSoftButtonObject *> *remoteButtons; @end @@ -83,7 +84,7 @@ NSString *errorMessage = @"The climate module id was not set or consent was not given"; [AlertManager sendAlertWithManager:self.sdlManager image:nil textField1:errorMessage textField2:nil]; } - self.sdlManager.screenManager.softButtonObjects = [self sdlex_getButtons]; + self.sdlManager.screenManager.softButtonObjects = self.remoteButtons; } - (NSString *)climateDataString { @@ -194,7 +195,7 @@ }]; } -- (NSArray*)sdlex_getButtons { +- (NSArray *)remoteButtons { SDLSoftButtonObject *acOnButton = [[SDLSoftButtonObject alloc] initWithName:@"AC On" text:@"AC On" artwork:nil handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) { if (buttonPress == nil) { return; } [self sdlex_turnOnAC]; |