统一处理AFNetwork的返回

2016-07-22  本文已影响42人  rlqs

[[NSNotificationCenter defaultCenter] addObserver:selfselector:@selector(networkRequestDidStart:) name:AFNetworkingOperationDidStartNotification object:nil];

[[NSNotificationCenter defaultCenter] addObserver:selfselector:@selector(networkRequestDidFinish:) name:AFNetworkingOperationDidFinishNotification object:nil];

#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >=70000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >=1090)

[[NSNotificationCenter defaultCenter] addObserver:selfselector:@selector(networkRequestDidStart:) name:AFNetworkingTaskDidResumeNotification object:nil];

[[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(networkRequestDidFinish:) name:AFNetworkingTaskDidCompleteNotification object:nil];

#endif

上一篇下一篇

猜你喜欢

热点阅读