文章标题

来源:互联网 发布:windowsvps搭建数据库 编辑:程序博客网 时间:2024/06/11 17:30

asdfjk

dj

- (void)dealloc {    [XXJNoteCenter removeObserver:self.collectionView];}//- (void)loadNotifyInfoData {    // 使用网络检测    [[AFNetworkReachabilityManager sharedManager] startMonitoring];    [[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {        if (status == 1 || status == 2) {            // 发送网络请求 获取通知分组数据            [[NetworkTools sharedNetworkTools] loadNotifyInfoGroupDataSuccess:^(NSArray *noticeGroupsArr, NSInteger resultCode, NSString *message) {                if (resultCode == 1) {                    //            [SVProgressHUD showWithStatus:message];                    //                    //            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{                    //                [SVProgressHUD dismiss];                    //            });                    // 进行字典装模型                    DDLogInfo(@"%@",noticeGroupsArr);#warning TODO 这里需要处理放回来的数据  (可能存在奔溃!)                    NotifyInfoGroup *notifyInfoGroup = [NotifyInfoGroup objectWithKeyValues:noticeGroupsArr];                    DDLogInfo(@"noticeGroupsArr = %@",noticeGroupsArr);                } else {                    [SVProgressHUD showWithStatus:message];                    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{                        [SVProgressHUD dismiss];                    });                }            } failure:^(NSError *error) {                DDLogError(@"%s ---- error = %@",__func__, error);            }];        }        DDLogInfo(@"%zd",status);    }];}
0 0
原创粉丝点击