Reputation: 71
I have a tableView and you can add cells. and it doesnt show my image on the left hand side of the newly added cells. I'm using the default cell style and here is my code: This is the button that allows us to add a cell.
- (IBAction)outlet1:(id)sender {
[cart.cells addObject:@"1"];
cart.cell.imageView.image = [UIImage imageNamed:@"paddle1.png"];
}
Please help! I checked the name of the image and it seems good. Thanks!
Upvotes: 0
Views: 103
Reputation: 10302
It would be better to place the image to the UITableViewCell inside the cellForRowAtIndexPath method, by setting the image to cell.imageView.image
Upvotes: 1