Wednesday, April 20, 2011

UILabel - how to change text position

Hi, I am trying to add subviews to my UITableView cells.

It works just perfect for me, but the text appears at the very left edge of a cell. How can I move it a little bit to the right side? I want to have a little margin from the left cell border.

Thank you in advance.

From stackoverflow
  • CGRect frame = theLabel.frame;
    frame.origin.x += LEFT_MARGIN;
    theLabel.frame = frame;
    

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.