AFNetworking を使用して JSON 応答を取得し、それに基づいて UITableView を設定しています。<a href='link'>
ただし、一部の JSON 応答などで HTML タグを取得しています。テーブルビューのセルにデータを入力する際に、それらを削除して適切な書式を設定するにはどうすればよいですか?
以下は、JSON 応答から AFNetworking を使用して tableview にデータをリロードするためのコードです。
NSURL *url = [NSURL URLWithString:@"http://xxxxx.com/api.php?req=all"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id responseObject) {
self.jobsArrayFromAFNetworking = [[responseObject objectForKey:@"all"]mutableCopy];
[spinner stopAnimating];
[self.tableView reloadData];
NSLog(@"JSON RESULT %@",responseObject);
}failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id responseObject){
NSLog(@"Request failed with error: %@, %@",error,error.userInfo);
}];
[operation start];
}