I am new to this iPhone development. Am developing a catalogue application. In that i need to give all product details with product images as tableview cell image dynamically since my images are coming from web service. I did this,
NSString* imageName = [NSString stringWithFormat:@"%@",[[stories objectAtIndex:indexPath.row]objectForKey:@"product_thumb_image"]];
cell.imageView.image.size.width==20;
cell.imageView.image.size.height==20;
cell.imageView.image = [UIImage imageNamed:imageName];
NSLog(@"imagename:%@",[[stories objectAtIndex:indexPath.row]objectForKey:@"product_thumb_image"]);
Am getting all the images in my console window and i checked that using nslog. But am not getting the images with simulator.What am doing wrong in this? Can anyone of you help me out?
Thanks in advance.
UIImage imageNamed:takes an NSString so if you want to use a formatted string like that useNSString‘s stringWithFormattry:
As you are new to iPhone development I’ll just expand that out to make it clearer (Ignore this if you already got what was happening there)