11

【iOS网络】AFNetworking

上传者:ysl86

发布时间:2012-12-27 21:29:23

大小:151 K

简介:AFNetworking 是 iOS 一个使用很方便的网络开发框架。示例代码: NSURL *url = [NSURL URLWithString:@"https://gowalla.com/users/mattt.json"]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {   NSLog(@"Name: %@ %@", [JSON valueForKeyPath:@"first_name"], [JSON valueForKeyPath:@"last_name"]); } failure:nil]; [operation start];

iOS源码
下 载 114人已下载
分享