Change image size of predefined UITableViewCell design "basic

I am currently creating a form using a normal UITableView. For the cells i choose the style "basic" in my Storyboard, which allows me to set an image to it. This image seems to have a set size of 52 x 52. But i want it to be 26 x 26. Is it possible without defining a custom UITableViewCell style?

Upvotes: 0

Views: 118

Answers (1)

crizzis
crizzis

Reputation: 10716

It is possible, but you need to subclass UITableViewCell. You can then adjust the frames of the imageView and the textLabel in layoutSubviews.

A much better solution, in my opinion, is not to use predefined styles at all and simply draw a prototype cell on the storyboard. You will have full control over the size of your image view.

Upvotes: 2

Related Questions