IOS development network data (used by AFNetWorking), iosafnetworking
Before using AFNetWorking, download
Official website download version 2.5: http://afnetworking.com/
Import after download
Then Import
#import "AFHTTPRequestOperationManager.h"
Start data parsing: Get data in JSON format
// Use third-party AFNetWorking to parse data-(void) stringWithFormat :( NSString *) url {AFHTTPRequestOperationManager * manager = [AFHTTPRequestOperationManager manager]; // network access is asynchronous, the callback is the main thread, so programmers don't have to worry about updating the UI in the main thread _ weak NewsTableViewController * newsTVC = self; [manager GET: url parameters: nil success: ^ (AFHTTPRequestOperation * operation, id responseObject) {NSDictionary * BigDic = responseObject; // responseObject is equivalent to data NSMut AbleDictionary * dic = [BigDic objectForKey: @ "result"]; if (dic. count! = 0) {NSMutableArray * array = [dic objectForKey: @ "data"]; self. modleArray = [NSMutableArray array]; for (NSMutableDictionary * smallDic in array) {NewsModle * newmodle = [[NewsModle alloc] init]; [newmodle Syntax: smallDic]; [newsTVC. modleArray addObject: newmodle];} [newsTVC. tableView reloadData] ;}} failure: ^ (AFHTTPRequestOperation * operation, NSError * error) {}];}