Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Get JSOn
- NSURL *url = [NSURL URLWithString:@"http://hive-concept.com/web/app_dev.php/get/drinks"];
- NSURLRequest *request = [NSURLRequest requestWithURL:url];
- AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
- NSLog(@"%@",[[[JSON objectAtIndex:0] objectForKey:@"cocktail"] objectForKey:@"name"]);
- NSLog(@"class : %@",[JSON class]);
- NSDictionary *data = (NSDictionary *)JSON;
- _drinksData = [[NSDictionary alloc] initWithDictionary:data];
- NSLog(@"drinksData %@",_drinksData);
- } failure:nil];
- [operation start];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement