UILable通过drawTextInRect修改文字间距

来源:互联网 发布:python高级编程第3版 编辑:程序博客网 时间:2024/05/29 18:05

重写UIlable的drawTextInRect Method,然后设置UIEdgeInsets。

- (void)drawTextInRect:(CGRect)rect{    UIEdgeInsets insets = {0, 5, 0, 15};    [super drawTextInRect:UIEdgeInsetsInsetRect(rect, insets)];}
原创粉丝点击