summaryrefslogtreecommitdiff
path: root/SmartDeviceLink/SDLShow.m
diff options
context:
space:
mode:
authorMuller, Alexander (A.) <amulle19@ford.com>2017-01-17 17:27:14 -0800
committerMuller, Alexander (A.) <amulle19@ford.com>2017-01-17 17:27:14 -0800
commita1c5ddde3424956a0f386335f71e8c36692147ac (patch)
tree2573975ba63a8981d144e9312106e9ddfcdd3a22 /SmartDeviceLink/SDLShow.m
parent436cb0793b6f7dbbd5f59c507c18b7ef71aef35f (diff)
downloadsdl_ios-a1c5ddde3424956a0f386335f71e8c36692147ac.tar.gz
Added in missing implementations of dictionary categories.
Diffstat (limited to 'SmartDeviceLink/SDLShow.m')
-rw-r--r--SmartDeviceLink/SDLShow.m28
1 files changed, 4 insertions, 24 deletions
diff --git a/SmartDeviceLink/SDLShow.m b/SmartDeviceLink/SDLShow.m
index 86f4211f9..24663f145 100644
--- a/SmartDeviceLink/SDLShow.m
+++ b/SmartDeviceLink/SDLShow.m
@@ -88,8 +88,7 @@
}
- (SDLTextAlignment)alignment {
- NSObject *obj = [parameters sdl_objectForName:SDLNameAlignment];
- return (SDLTextAlignment)obj;
+ return [parameters sdl_objectForName:SDLNameAlignment];
}
- (void)setStatusBar:(NSString *)statusBar {
@@ -121,12 +120,7 @@
}
- (SDLImage *)graphic {
- NSObject *obj = [parameters sdl_objectForName:SDLNameGraphic];
- if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
- return (SDLImage *)obj;
- } else {
- return [[SDLImage alloc] initWithDictionary:(NSDictionary *)obj];
- }
+ return [parameters sdl_objectForName:SDLNameGraphic ofClass:SDLImage.class];
}
- (void)setSecondaryGraphic:(SDLImage *)secondaryGraphic {
@@ -134,12 +128,7 @@
}
- (SDLImage *)secondaryGraphic {
- NSObject *obj = [parameters sdl_objectForName:SDLNameSecondaryGraphic];
- if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
- return (SDLImage *)obj;
- } else {
- return [[SDLImage alloc] initWithDictionary:(NSDictionary *)obj];
- }
+ return [parameters sdl_objectForName:SDLNameSecondaryGraphic ofClass:SDLImage.class];
}
- (void)setSoftButtons:(NSMutableArray<SDLSoftButton *> *)softButtons {
@@ -147,16 +136,7 @@
}
- (NSMutableArray<SDLSoftButton *> *)softButtons {
- NSMutableArray<SDLSoftButton *> *array = [parameters sdl_objectForName:SDLNameSoftButtons];
- if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLSoftButton.class]) {
- return array;
- } else {
- NSMutableArray<SDLSoftButton *> *newList = [NSMutableArray arrayWithCapacity:[array count]];
- for (NSDictionary<NSString *, id> *dict in array) {
- [newList addObject:[[SDLSoftButton alloc] initWithDictionary:(NSDictionary *)dict]];
- }
- return newList;
- }
+ return [parameters sdl_objectsForName:SDLNameSoftButtons ofClass:SDLSoftButton.class];
}
- (void)setCustomPresets:(NSMutableArray<NSString *> *)customPresets {