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/

posted @ 2014-05-13 14:32  cocoajin  阅读(18885)  评论(2编辑  收藏  举报