From 739e76308982eeb2d83c20f377e1723dff5b234a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20A=2E=20A=CC=81lvarez?= Date: Fri, 15 Jul 2016 21:00:51 +0200 Subject: [PATCH] don't use QOS_CLASS_* on iOS <8 --- Mini vMac/UIImage+DiskImageIcon.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Mini vMac/UIImage+DiskImageIcon.m b/Mini vMac/UIImage+DiskImageIcon.m index 8ab3eb3..bacea39 100644 --- a/Mini vMac/UIImage+DiskImageIcon.m +++ b/Mini vMac/UIImage+DiskImageIcon.m @@ -55,7 +55,8 @@ + (UIImage *)imageWithIconForDiskImage:(NSString *)path { + (void)loadIconForDiskImageAndNotify:(NSString *)path { if ([NSThread isMainThread]) { - dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{ + long queue = NSFoundationVersionNumber >= NSFoundationVersionNumber_iOS_8_0 ? QOS_CLASS_USER_INITIATED : DISPATCH_QUEUE_PRIORITY_LOW; + dispatch_async(dispatch_get_global_queue(queue, 0), ^{ [self loadIconForDiskImageAndNotify:path]; }); return;