diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2016-09-23 15:03:28 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2016-09-23 15:03:28 -0400 |
commit | 1efd50f44b6343891eb0a390b70b70815f11f0be (patch) | |
tree | 4ceb9181e93398a4f8e71c0bb4e21d1adfeca805 /SmartDeviceLink | |
parent | eef7d45f980edf0d28a3335fbcbf9302979b6e8a (diff) | |
download | sdl_ios-1efd50f44b6343891eb0a390b70b70815f11f0be.tar.gz |
Update version checking code to use what we already use
Diffstat (limited to 'SmartDeviceLink')
-rw-r--r-- | SmartDeviceLink/SDLLockScreenViewController.m | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/SmartDeviceLink/SDLLockScreenViewController.m b/SmartDeviceLink/SDLLockScreenViewController.m index 181cbc1c9..f7417fec2 100644 --- a/SmartDeviceLink/SDLLockScreenViewController.m +++ b/SmartDeviceLink/SDLLockScreenViewController.m @@ -9,6 +9,7 @@ #import "SDLLockScreenViewController.h" #import "NSBundle+SDLBundle.h" +#import "SDLGlobals.h" NS_ASSUME_NONNULL_BEGIN @@ -158,12 +159,12 @@ NS_ASSUME_NONNULL_BEGIN } + (UIImage*)sdl_imageWithName:(NSString*)name { -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 - return [UIImage imageNamed:name inBundle:[NSBundle sdlBundle] compatibleWithTraitCollection:nil]; -#else - NSString* bundlePath = [[NSBundle sdlBundle] bundlePath]; - return [UIImage imageNamed:[NSString stringWithFormat:@"%@/%@", bundlePath, name]]; -#endif + if (SDL_SYSTEM_VERSION_LESS_THAN(@"8.0")) { + NSString* bundlePath = [[NSBundle sdlBundle] bundlePath]; + return [UIImage imageNamed:[NSString stringWithFormat:@"%@/%@", bundlePath, name]]; + } else { + return [UIImage imageNamed:name inBundle:[NSBundle sdlBundle] compatibleWithTraitCollection:nil]; + } } + (BOOL)shouldUseWhiteForegroundForBackgroundColor:(UIColor *)backgroundColor { @@ -182,4 +183,4 @@ NS_ASSUME_NONNULL_BEGIN @end -NS_ASSUME_NONNULL_END
\ No newline at end of file +NS_ASSUME_NONNULL_END |