summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SmartDeviceLink/SDLLockScreenViewController.m15
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