Commit 066aa197 authored by David Cordero's avatar David Cordero Committed by Felix Paul Kühne

Remove code for not longer supported iOS versions

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <felix@feepk.net>
parent 6c4ccdee
......@@ -25,9 +25,6 @@
#import "UIViewController+VLCAlert.h"
#import "VLCFullscreenMovieTVViewController.h"
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[UIDevice currentDevice] systemVersion].floatValue >= [v floatValue])
#ifndef NDEBUG
#define APLog(format, ...) NSLog(format, ## __VA_ARGS__)
#else
......
......@@ -150,13 +150,6 @@
NSString *profileTitle;
if ([transcodeValue length] && [orgPNValue length]) {
profileTitle = [NSString stringWithFormat:@"%@ (%@)", transcodeValue, orgPNValue];
// The extra whitespace is to get UIActionSheet to render the text better (this bug has been fixed in iOS 8)
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
if (!SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
profileTitle = [NSString stringWithFormat:@" %@ ", profileTitle];
}
}
} else if ([transcodeValue length]) {
profileTitle = transcodeValue;
} else if ([orgPNValue length]) {
......
......@@ -27,8 +27,6 @@
#import "VLCSidebarController.h"
#import "UIViewController+VLCAlert.h"
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[UIDevice currentDevice] systemVersion].floatValue >= [v floatValue])
#ifndef NDEBUG
#define APLog(format, ...) NSLog(format, ## __VA_ARGS__)
#else
......
......@@ -75,7 +75,7 @@
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return @available(iOS 8.0, *) ? 5 : 4; // on iOS 8+ add document picker option
return 5;
}
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
......
......@@ -25,9 +25,6 @@
- (void)showDocumentMenuViewController:(id)sender
{
if (!@available(iOS 8, *))
return;
UIDocumentMenuViewController *importMenu = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:@[(id)kUTTypeAudiovisualContent] inMode:UIDocumentPickerModeImport];
importMenu.delegate = self;
......
......@@ -52,20 +52,11 @@
[self setClipsToBounds:YES];
#if TARGET_OS_IOS
if (@available(iOS 8, *)) {
_effectView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]];
_effectView.frame = self.bounds;
_effectView.clipsToBounds = YES;
_effectView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self insertSubview:_effectView atIndex:0];
} else {
_usingToolbarHack = YES;
if (![self toolbar]) {
[self setToolbar:[[UIToolbar alloc] initWithFrame:[self bounds]]];
[self.layer insertSublayer:[self.toolbar layer] atIndex:0];
[self.toolbar setBarStyle:UIBarStyleBlack];
}
}
_effectView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]];
_effectView.frame = self.bounds;
_effectView.clipsToBounds = YES;
_effectView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self insertSubview:_effectView atIndex:0];
#else
_effectView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]];
_effectView.frame = self.bounds;
......
......@@ -344,7 +344,7 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
- (void)createSpotlightItem:(nonnull NSManagedObject *)mediaObject
{
if (@available(iOS 9.0, *) && ![VLCKeychainCoordinator passcodeLockEnabled]) {
if (![VLCKeychainCoordinator passcodeLockEnabled]) {
self.userActivity = [[NSUserActivity alloc] initWithActivityType:kVLCUserActivityPlaying];
MLFile *file = nil;
......@@ -1104,21 +1104,11 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
NSArray *indexPaths = [self usingTableViewToShowData] ? [self.tableView indexPathsForSelectedRows] : [self.collectionView indexPathsForSelectedItems];
if ((!indexPaths || [indexPaths count] == 0) && !_deleteFromTableView) {
if (@available(iOS 8, *)) {
UIAlertController *invalidSelection = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"DELETE_INVALID_TITLE", nil) message:NSLocalizedString(@"DELETE_INVALID_MESSAGE", nil) preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *doneAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"BUTTON_OK", nil) style:UIAlertActionStyleDefault handler:nil];
UIAlertController *invalidSelection = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"DELETE_INVALID_TITLE", nil) message:NSLocalizedString(@"DELETE_INVALID_MESSAGE", nil) preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *doneAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"BUTTON_OK", nil) style:UIAlertActionStyleDefault handler:nil];
[invalidSelection addAction:doneAction];
[self presentViewController:invalidSelection animated:YES completion:nil];
} else {
//TODO remove when we drop iOS7
VLCAlertView *alert = [[VLCAlertView alloc] initWithTitle:NSLocalizedString(@"DELETE_INVALID_TITLE", nil)
message:NSLocalizedString(@"DELETE_INVALID_MESSAGE", nil)
cancelButtonTitle:NSLocalizedString(@"BUTTON_OK", nil)
otherButtonTitles:nil];
alert.completion = nil;
[alert show];
}
[invalidSelection addAction:doneAction];
[self presentViewController:invalidSelection animated:YES completion:nil];
} else {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"DELETE_TITLE", nil) message:nil preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *deleteAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"BUTTON_DELETE", nil) style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
......@@ -1362,7 +1352,6 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
[self.collectionView.collectionViewLayout invalidateLayout];
}
// >= iOS 8
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
{
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
......
......@@ -1589,7 +1589,6 @@ currentMediaHasTrackToChooseFrom:(BOOL)currentMediaHasTrackToChooseFrom
[self setControlsHidden:NO animated:YES];
}
// >= iOS 8
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
{
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
......
......@@ -293,11 +293,9 @@
} else
#endif
{
if (@available(iOS 8.2, *)) {
if (WKInterfaceDevice.currentDevice != nil) {
CGRect screenRect = WKInterfaceDevice.currentDevice.screenBounds;
imageSize = CGSizeMake(screenRect.size.width * WKInterfaceDevice.currentDevice.screenScale, 120.);
}
if (WKInterfaceDevice.currentDevice != nil) {
CGRect screenRect = WKInterfaceDevice.currentDevice.screenBounds;
imageSize = CGSizeMake(screenRect.size.width * WKInterfaceDevice.currentDevice.screenScale, 120.);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment