UIImageView in UITableCell gets a weird size
Posted
by Behlül
on Stack Overflow
See other posts from Stack Overflow
or by Behlül
Published on 2010-06-17T06:36:05Z
Indexed on
2010/06/17
12:53 UTC
Read the original article
Hit count: 289
Hi, I'm trying to place a UIImageView in a UITableViewCell.
I create a special view called ProductView. In that view, I have several components, one of them being a UIImageView. I set this ProductView as content view of the UITableViewCell. Everything is drawn properly except the UIImageView. UIImageView gets scaled meaninglessly. It's height gets twice the height of the table cell size.
I've spent hours trying to solve this problem. I've set the frame of UIImageView manually, I've called drawRect method of UIImage in UIImageView, neither of them worked.
I'm thinking of replacing UITableView with a UIScrollView if I can't find a solution. Does anyone know how to solve this problem?
© Stack Overflow or respective owner