Permalink
Browse files

Minor refactoring for AFNetworkActivityIndicatorManager

  • Loading branch information...
1 parent 34f8cd1 commit eeccdc7717a0b3fcdf12abf6ee08c67e35aae0b5 @mattt mattt committed Sep 27, 2013
@@ -25,6 +25,7 @@
#import <Availability.h>
#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
+
#import <UIKit/UIKit.h>
/**
@@ -22,10 +22,14 @@
#import "AFNetworkActivityIndicatorManager.h"
+#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
+
#import "AFHTTPRequestOperation.h"
+
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
#import "AFURLSessionManager.h"
+#endif
-#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
static NSTimeInterval const kAFNetworkActivityIndicatorInvisibilityDelay = 0.17;
static NSURLRequest * AFNetworkRequestFromNotification(NSNotification *notification) {
@@ -74,9 +78,11 @@ - (id)init {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidStart:) name:AFNetworkingOperationDidStartNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingOperationDidFinishNotification object:nil];
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidStart:) name:AFNetworkingTaskDidStartNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingTaskDidSuspendNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkRequestDidFinish:) name:AFNetworkingTaskDidFinishNotification object:nil];
+#endif
return self;
}

0 comments on commit eeccdc7

Please sign in to comment.