Remove @available checks for < iOS 9.3

This commit is contained in:
Cameron Gutman
2020-11-14 15:27:49 -06:00
parent 313af5a7e7
commit dc9b5b7c96
4 changed files with 22 additions and 41 deletions
-2
View File
@@ -24,12 +24,10 @@ static NSString* DB_NAME = @"Limelight_iOS.sqlite";
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
#if !TARGET_OS_TV #if !TARGET_OS_TV
if (@available(iOS 9.0, *)) {
UIApplicationShortcutItem* shortcut = [launchOptions valueForKey:UIApplicationLaunchOptionsShortcutItemKey]; UIApplicationShortcutItem* shortcut = [launchOptions valueForKey:UIApplicationLaunchOptionsShortcutItemKey];
if (shortcut != nil) { if (shortcut != nil) {
_pcUuidToLoad = (NSString*)[shortcut.userInfo objectForKey:@"UUID"]; _pcUuidToLoad = (NSString*)[shortcut.userInfo objectForKey:@"UUID"];
} }
}
#endif #endif
return YES; return YES;
} }
-5
View File
@@ -49,12 +49,7 @@ static UIImage* noImage;
UILongPressGestureRecognizer* longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(appLongClicked:)]; UILongPressGestureRecognizer* longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(appLongClicked:)];
[self addGestureRecognizer:longPressRecognizer]; [self addGestureRecognizer:longPressRecognizer];
if (@available(iOS 9.0, tvOS 9.0, *)) {
[self addTarget:self action:@selector(appClicked:) forControlEvents:UIControlEventPrimaryActionTriggered]; [self addTarget:self action:@selector(appClicked:) forControlEvents:UIControlEventPrimaryActionTriggered];
}
else {
[self addTarget:self action:@selector(appClicked:) forControlEvents:UIControlEventTouchUpInside];
}
[self addTarget:self action:@selector(buttonSelected:) forControlEvents:UIControlEventTouchDown]; [self addTarget:self action:@selector(buttonSelected:) forControlEvents:UIControlEventTouchDown];
[self addTarget:self action:@selector(buttonDeselected:) forControlEvents:UIControlEventTouchUpInside | UIControlEventTouchCancel | UIControlEventTouchDragExit]; [self addTarget:self action:@selector(buttonDeselected:) forControlEvents:UIControlEventTouchUpInside | UIControlEventTouchCancel | UIControlEventTouchDragExit];
-10
View File
@@ -102,12 +102,7 @@ static const int LABEL_DY = 20;
self = [self init]; self = [self init];
_callback = callback; _callback = callback;
if (@available(iOS 9.0, tvOS 9.0, *)) {
[self addTarget:self action:@selector(addClicked) forControlEvents:UIControlEventPrimaryActionTriggered]; [self addTarget:self action:@selector(addClicked) forControlEvents:UIControlEventPrimaryActionTriggered];
}
else {
[self addTarget:self action:@selector(addClicked) forControlEvents:UIControlEventTouchUpInside];
}
[_hostLabel setText:@"Add Host Manually"]; [_hostLabel setText:@"Add Host Manually"];
[_hostLabel sizeToFit]; [_hostLabel sizeToFit];
@@ -127,12 +122,7 @@ static const int LABEL_DY = 20;
UILongPressGestureRecognizer* longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(hostLongClicked:)]; UILongPressGestureRecognizer* longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(hostLongClicked:)];
[self addGestureRecognizer:longPressRecognizer]; [self addGestureRecognizer:longPressRecognizer];
if (@available(iOS 9.0, tvOS 9.0, *)) {
[self addTarget:self action:@selector(hostClicked) forControlEvents:UIControlEventPrimaryActionTriggered]; [self addTarget:self action:@selector(hostClicked) forControlEvents:UIControlEventPrimaryActionTriggered];
}
else {
[self addTarget:self action:@selector(hostClicked) forControlEvents:UIControlEventTouchUpInside];
}
[self updateContentsForHost:host]; [self updateContentsForHost:host];
[self startUpdateLoop]; [self startUpdateLoop];
@@ -1138,7 +1138,6 @@ static NSMutableSet* hostList;
- (void)updateHostShortcuts { - (void)updateHostShortcuts {
#if !TARGET_OS_TV #if !TARGET_OS_TV
if (@available(iOS 9.0, *)) {
NSMutableArray* quickActions = [[NSMutableArray alloc] init]; NSMutableArray* quickActions = [[NSMutableArray alloc] init];
@synchronized (hostList) { @synchronized (hostList) {
@@ -1158,7 +1157,6 @@ static NSMutableSet* hostList;
} }
[UIApplication sharedApplication].shortcutItems = quickActions; [UIApplication sharedApplication].shortcutItems = quickActions;
}
#endif #endif
} }