iOS 设置UILabel 的内边距

iOS 设置UILabel 的内边距

- (void)drawTextInRect:(CGRect)rect {
    UIEdgeInsets insets = {0, 5, 0, 5};
    [super drawTextInRect:UIEdgeInsetsInsetRect(rect, insets)];
}

 

参考:http://stackoverflow.com/questions/3476646/uilabel-text-margin

http://unmi.cc/uilable-uitextfield-padding-insets/

iOS 设置UILabel 的内边距,布布扣,bubuko.com

文章来自:http://www.cnblogs.com/cocoajin/p/3725478.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3