当操作正在运行时,我无法在JSON模型CREATED BY ACCELERATOR中输入数据。 你能告诉我我做错了什么吗?Json加速器和AFNetworking
{
[super viewDidLoad];
NSLog(@"you are in a tableViewController");
self.title = @"NavigationOrdini";
NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.stampa6x3.com/json.php?azione=ordini"]];
AFJSONRequestOperation* operation;
operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:req
success:^(NSURLRequest *request, NSURLResponse *response, id JSON)
{
[[ordiniModel alloc] initWithDictionary:JSON];
}
failure:^(NSURLRequest *request, NSURLResponse *response, NSError
*error, id JSON) {
[self setTitle:@"Dictionary"];
NSLog(@"failed! %d",[error code]);
}];
[operation start];
ordiniModel*test;
NSLog(@"il valore è %@",test.ordini.description);
}
你能更具体?你作为回应得到什么?你有错误吗? – 2013-03-26 20:27:37
回应没关系!没有错误 – 2013-03-26 20:29:54