29,028
社区成员
发帖
与我相关
我的任务
分享
NSString *req_url =@"http://xxxxxxx"; /////请求的url地址
NSURL *url = [NSURL urlWithString:req_url];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
//////异步请求
[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) {
//////得到请求返回的内容
NSString *html_content = [NSString stringWithData:data encoding:NSUTF8StringEncoding];
///////替换内容
}];