操作运行时,无法在由加速器创建的 JSON 模型中输入数据。你能告诉我我做错了什么吗?
{
[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);
}