iOS 设置UILabel 的内边距

时间:2014-05-14 10:12:21   收藏:0   阅读:4319

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

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!