Tomer Even
Tomer Even

Reputation: 4980

How to programmatically choose a default thumbnail image?

I have a tableView based app and I made a custom TableViewCell that have a thumbnail in it. I wish to programmatically choose a default thumbnail image for my custom TableViewCell. any ideas on how to do that?

Thanks.

Upvotes: 0

Views: 206

Answers (2)

alloc_iNit
alloc_iNit

Reputation: 5183

    - (void)setCellIconImage:(UIImage*)iconImage
    {
        self.imgView.image = iconImage;
    }

Upvotes: 0

Nekto
Nekto

Reputation: 17877

Set tag for your UIImageView in your custom UITableViewCell, for example, let it be 10.

When you want to show image in that view for some UITableViewCell *cell; do next:

UIImageView *imageView = (UIImageView *)[cell viewForTag:10];
imageView.image = [UIImage ....];

Upvotes: 1

Related Questions