AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
[manager GET:@"http://v.juhe.cn/toutiao/index?key=67968aeebf1f4e3b6170f7217b6f3cdb" parameters:nil progress:nil success:^(NSURLSessionTask *task, id responseObject) {
//
self.dataSource = [Model mj_objectArrayWithKeyValuesArray:responseObject[@"result"][@"data"]];
//
// ================ 字典包数组==============
// [mjmodel mj_setupObjectClassInArray:^NSDictionary *{
// return @"类的数组属性":[字典对应的model class ];
// }];
[self.tbv reloadData];
// NSLog(@"JSON: %@", responseObject);
} failure:^(NSURLSessionTask *operation, NSError *error) {
//NSLog(@"Error: %@", error);
}];```
网友评论