Commit 84d93120 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Optimize sidemenu speed for older devices

parent 2852ecc7
......@@ -27,7 +27,7 @@
free(answer);
if ([currentMachine hasPrefix:@"iPhone2"] || [currentMachine hasPrefix:@"iPhone3"] || [currentMachine hasPrefix:@"iPad1"] || [currentMachine hasPrefix:@"iPod3"] || [currentMachine hasPrefix:@"iPod4"]) {
// iPhone 3GS, iPhone 4, first gen. iPad, 3rd and 4th generation iPod touch
// iPhone 4, 4th generation iPod touch
APLog(@"this is a cat one device");
return 1;
} else if ([currentMachine hasPrefix:@"iPhone4"] || [currentMachine hasPrefix:@"iPad3,1"] || [currentMachine hasPrefix:@"iPad3,2"] || [currentMachine hasPrefix:@"iPad3,3"] || [currentMachine hasPrefix:@"iPod4"] || [currentMachine hasPrefix:@"iPad2"] || [currentMachine hasPrefix:@"iPod5"]) {
......@@ -39,7 +39,7 @@
APLog(@"this is a cat three device");
return 3;
} else {
// iPhone 6, 2014 iPads
// iPhone 6 + 6S, 2014+2015 iPads
APLog(@"this is a cat four device");
return 4;
}
......
......@@ -14,6 +14,7 @@
#import "VLCMenuTableViewController.h"
#import "UIViewController+RESideMenu.h"
#import "RESideMenu.h"
#import "UIDevice+VLC.h"
@interface VLCSidebarController()
{
......@@ -57,6 +58,13 @@
}
_sideMenuViewController.backgroundImage = [UIImage imageNamed:@"menu-background"];
if ([[UIDevice currentDevice] speedCategory] <= 2) {
_sideMenuViewController.animationDuration = 0.1f;
_sideMenuViewController.parallaxEnabled = NO;
_sideMenuViewController.contentViewShadowEnabled = NO;
_sideMenuViewController.bouncesHorizontally = NO;
}
return self;
}
......
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