use instancesRespondsToSelector

This commit is contained in:
Geoffrey Goh
2016-05-06 18:06:59 -07:00
parent 21ebed7fd4
commit b93e97331a

View File

@@ -27,7 +27,7 @@ failCallback:(void (^)(NSError *err))failCallback {
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request
delegate:self
startImmediately:NO];
if ([NSOperationQueue respondsToSelector:@selector(setUnderlyingQueue:)]) {
if ([NSOperationQueue instancesRespondToSelector:@selector(setUnderlyingQueue:)]) {
NSOperationQueue *delegateQueue = [NSOperationQueue new];
delegateQueue.underlyingQueue = self.operationQueue;
[connection setDelegateQueue:delegateQueue];