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.
Changing the text of an existing UILabel can be done by accessing and modifying the text property of the UILabel . This can be done directly using String literals or indirectly using variables.
Align the text left or right Select the text that you want to align. On the Home tab, in the Paragraph group, click Align Left or Align Right .
Double Click on Bold to select it, and then right click on it to see more options. Select font > Bold from that option. It should do the task.
CGRect frame = theLabel.frame;
frame.origin.x += LEFT_MARGIN;
theLabel.frame = frame;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With