Right now I have a table view with several cells. Each cell has an image in it that's a different size. It's unattractive so I want to change them so they all crop the images to be the same size.
The code I'm trying to do this with is...
It's selecting the correct image, and changing the content mode seems to work, but the images all have different widths and so the text labels don't line up right. How can I change all of them to have the same width?
(It gives me the error "Lvalue required as left operand of assignment" on the lines changing the width and height.)
The code I'm trying to do this with is...
Code:
cell.imageView.image = [UIImage imageNamed:[NSString stringWithFormat: @"%@.jpg", cell.textLabel.text]];
cell.imageView.frame.size.width = 20.0;
cell.imageView.frame.size.height = 20.0;
cell.imageView.contentMode = UIViewContentModeScaleToFill;
It's selecting the correct image, and changing the content mode seems to work, but the images all have different widths and so the text labels don't line up right. How can I change all of them to have the same width?
(It gives me the error "Lvalue required as left operand of assignment" on the lines changing the width and height.)