美文网首页
统一处理AFNetwork的返回

统一处理AFNetwork的返回

作者: rlqs | 来源:发表于2016-07-22 15:52 被阅读42次

    [[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

    相关文章

      网友评论

          本文标题:统一处理AFNetwork的返回

          本文链接:https://www.haomeiwen.com/subject/exuijttx.html