views:

427

answers:

2

I'm using a sectioned TableView, and I want to show an image on the left side of the cell. If I pick one from the photo library (out of the example photos in simulator) and set it as UITableViewCell.imageView.image, it takes up the whole screen.

How can I resize the image so that it fits exactly into the cell's image view?

Thanks,

Yassin

+1  A: 

This is basically the same question as How to scale a UIImageView proportionally ?, which has a good answer.

Add that category to your project and call it with the size of your view. I've used the code and it works well.

amrox
Thanks, works perfekt.
Yassin
A: 

Well, another question: Is it possible to fit the picture exactly in the round corners on the left side of the cell? Or can I just resize it?

// Any suggestions?

... push ...

Yassin