Commit f2aa9a4c authored by Felix Paul Kühne's avatar Felix Paul Kühne

Thumbnailer: create larger snapshots if device runs iOS 7 (phone form factor only)

parent 2d49ebc5
......@@ -52,4 +52,12 @@
#define APLog(format, ...) NSLog(format, ## __VA_ARGS__)
#else
#define APLog(format, ...)
#endif
\ No newline at end of file
#endif
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#ifdef __IPHONE_7_0
#define SYSTEM_RUNS_IOS7 SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")
#else
#define SYSTEM_RUNS_IOS7 NO
#endif
......@@ -75,12 +75,17 @@
thumbnailer.thumbnailHeight = 204.;
}
} else {
if ([UIScreen mainScreen].scale==2.0) {
thumbnailer.thumbnailWidth = 200.;
thumbnailer.thumbnailHeight = 150.;
if (SYSTEM_RUNS_IOS7) {
thumbnailer.thumbnailWidth = 480.;
thumbnailer.thumbnailHeight = 270.;
} else {
thumbnailer.thumbnailWidth = 100.;
thumbnailer.thumbnailHeight = 75.;
if ([UIScreen mainScreen].scale==2.0) {
thumbnailer.thumbnailWidth = 480.;
thumbnailer.thumbnailHeight = 270.;
} else {
thumbnailer.thumbnailWidth = 240.;
thumbnailer.thumbnailHeight = 135.;
}
}
}
[thumbnailer fetchThumbnail];
......
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