AFNetWorking只有异步请求,所以使用官方请求
NSData类型转换为NSDictionary类型NSString *string = [NSString stringWithFormat:@"%@xxx", BaseURLString];
NSURL *url = [NSURL URLWithString:string];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
NSHTTPURLResponse *response=nil;
NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:nil];
NSDictionary *jsonDict = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil];
self.category=[(NSMutableDictionary *)jsonDict info];
446

被折叠的 条评论
为什么被折叠?



