當操作正在運行時,我無法在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