Search code examples
iphonealignmentpaddingtableview

iPhone TableView: defining padding between images and text in a cell


does anybody know how to vertically align these text elements. I would like to define an absolute left padding for the text which is not affected by each image dimensions. It's quite annoying like this:

enter image description here

thanks a lot!


Solution

  • You have two options.

    1) UITableViewCell has a textLabel property which you can access and adjust the frame. See the Apple docs for more info on UITableViewCell

    2) You can ensure that all of your icons have the same width.