您的位置:首页 > 其它

文章标题

2015-08-02 10:49 281 查看

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);
}];
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: