How to add padding-left on a UILabel created programmatically?

前端 未结 8 1104
温柔的废话
温柔的废话 2020-12-29 06:33

I know this is a noob question but ...I have these labels on a tableview, but the text is completely squished to the left. I want to add a bit of padding. How do I go about

8条回答
  •  梦谈多话
    2020-12-29 06:46

    you can simple add white space at the begin of you text;

    [NSString stringWithFormat:@"  %@",text];
    

    It is 'evil' way to add 'padding', but it may help.

提交回复
热议问题