Hope this helps
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UIStoryboard *iPhone = [UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil];
CJArtikelDetailViewController *artikelView = [iPhone instantiateViewControllerWithIdentifier:@"detail"];
NSDictionary *object = [arrayNeuheiten objectAtIndex:indexPath.row];
//NSLog(@"%@", object);
//assign selected product id to wareId here and pass it to detail view controller it will work
wareID = [object objectForKey:@"ware_id"];
NSLog(@"Waren ID: %@", wareID);
NSString *detail = [NSString stringWithFormat:@"%@", wareID];
artikelView.productID = detail;
[self.navigationController pushViewController:artikelView animated:YES];
[neuheitenTableView deselectRowAtIndexPath:indexPath animated:YES];
NSLog(@"IndexPath: %@", [indexPath description]);
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *neuheitenCell = @"neuheitenCell";
CJHomeTableCell *cell = [tableView dequeueReusableCellWithIdentifier:neuheitenCell];
/*
NSNumber *preis = [[arrayArtikelPreis objectAtIndex:indexPath.row] objectForKey:@"preis"];
NSMutableString *test = [NSMutableString stringWithFormat:@"€ %@", preis];
cell.artikelPreis.text = test;
*/
NSString *imageString = [[arrayNeuheiten objectAtIndex:indexPath.row] objectForKey:@"bild"];
//NSLog(@"BildURL: %@", imageString);
NSURL *imageURL = [NSURL URLWithString:imageString];
[cell.artikelImage setImageWithURL:imageURL placeholderImage:[UIImage imageNamed:@""]];
//comment out wareId value assigning code here
NSDictionary *object = [arrayNeuheiten objectAtIndex:indexPath.row];//commemted this line by mistake
//NSLog(@"%@", object);
//wareID = [object objectForKey:@"ware_id"];
//NSLog(@"Waren ID: %@", wareID);
cell.artikelName.text = [object objectForKey:@"name"];
cell.artikelHersteller.text = [object objectForKey:@"lieferant_name"];
return cell;
}