From fd0c7ae53d41cdc59efc9e5e5815feb8ef203df0 Mon Sep 17 00:00:00 2001 From: ibireme Date: Wed, 16 Mar 2016 00:47:24 +0800 Subject: [PATCH] remove `YYDispatchQueuePool` due to dynamic library compile error. --- YYText/Utility/YYTextAsyncLayer.m | 9 --------- YYText/YYLabel.m | 12 +----------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/YYText/Utility/YYTextAsyncLayer.m b/YYText/Utility/YYTextAsyncLayer.m index 2ec093c3..4187f881 100644 --- a/YYText/Utility/YYTextAsyncLayer.m +++ b/YYText/Utility/YYTextAsyncLayer.m @@ -12,17 +12,9 @@ #import "YYTextAsyncLayer.h" #import -#if __has_include("YYDispatchQueuePool.h") -#import "YYDispatchQueuePool.h" -#else -#import -#endif /// Global display queue, used for content rendering. static dispatch_queue_t YYTextAsyncLayerGetDisplayQueue() { -#ifdef YYDispatchQueuePool_h - return YYDispatchQueueGetForQOS(NSQualityOfServiceUserInitiated); -#else #define MAX_QUEUE_COUNT 16 static int queueCount; static dispatch_queue_t queues[MAX_QUEUE_COUNT]; @@ -47,7 +39,6 @@ static dispatch_queue_t YYTextAsyncLayerGetDisplayQueue() { if (cur < 0) cur = -cur; return queues[(cur) % queueCount]; #undef MAX_QUEUE_COUNT -#endif } static dispatch_queue_t YYTextAsyncLayerGetReleaseQueue() { diff --git a/YYText/YYLabel.m b/YYText/YYLabel.m index d2e86cca..4c906a99 100644 --- a/YYText/YYLabel.m +++ b/YYText/YYLabel.m @@ -14,22 +14,12 @@ #import "YYTextWeakProxy.h" #import "YYTextUtilities.h" #import "NSAttributedString+YYText.h" - -#if __has_include("YYDispatchQueuePool.h") -#import "YYDispatchQueuePool.h" -#else #import -#endif -#ifdef YYDispatchQueuePool_h -static dispatch_queue_t YYLabelGetReleaseQueue() { - return YYDispatchQueueGetForQOS(NSQualityOfServiceUtility); -} -#else + static dispatch_queue_t YYLabelGetReleaseQueue() { return dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0); } -#endif #define kLongPressMinimumDuration 0.5 // Time in seconds the fingers must be held down for long press gesture.