版权声明:本文为博主原创文章,转载请标明文章来源。 https://blog.csdn.net/SunFlowerInRain/article/details/77369593
重写UIlable的drawTextInRect
Method,然后设置UIEdgeInsets。
- (void)drawTextInRect:(CGRect)rect{
UIEdgeInsets insets = {0, 5, 0, 15};
[super drawTextInRect:UIEdgeInsetsInsetRect(rect, insets)];
}