I'm working in a simple IOS app with objective-c, and i want to load an image to the table cell. I have a litle web service that give me a json data like this:
[{"id":1,"name":"Papas","description":"Papas chilotas negras","images":
[{"url":"/uploads/product/images/1/8282486574_382f59c31e_o.jpg",
"thumb":"url":"/uploads/product/images/1/
thumb_8282486574_382f59c31e_o.jpg"},
"catalog":"url":"/uploads/product/images/1/
catalog_8282486574_382f59c31e_o.jpg"},
"big":"url":"/uploads/product/images/1/
big_8282486574_382f59c31e_o.jpg"}}],
"price":1200,"stand_id":3,"created_at":"2017-10-
24T04:01:09.000Z","updated_at":"2017-10-24T04:01:09.000Z"}]
I had set up the name and description like this tableCell
The problem is how do i access the path to the thumb version of the image to show it in the table cell.
this is the code i have to populate the table
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
NSDictionary *dictionary = [self.json objectAtIndex:indexPath.row];
cell.textLabel.text=[dictionary objectForKey:@"name"];
cell.detailTextLabel.text = [dictionary objectForKey:@"description"];
return cell;
}
"thumb" : "url" : " /uploads/product/... /_o.jpg"<- never seen this type of json. So iam closing this post as a uncleared question.