Reputation: 33644
I have a UITableViewCell and I am using it's UIImageView and I have an image of size 25,25 that I set the UIImageView with. The issue is that when I tap on the cell, the image size resizes to the row height, which is not what I wanted. I wanted it to stay fix at 25,25. Is this possible? Here's my code:
cell.imageView.bounds = CGRectMake(cell.imageView.origin.x, cell.imageView.origin.y, 25, 25);
cell.imageView.frame = cell.imageView.bounds;
cell.imageView.autoresizingMask = UIViewAutoresizingNone;
cell.imageView.clipsToBounds = YES;
cell.imageView.layer.borderWidth = 0;
cell.imageView.layer.borderColor = [UIColor blackColor].CGColor;
Upvotes: 0
Views: 413
Reputation: 251
Yes it's possible but you have to create your own UITableViewCell by subclass UITableViewCell and add UIImageView with your fixed size
Upvotes: 1