//令绘制区域为原始区域,增加的内边距区域不绘制
[super drawTextInRect:UIEdgeInsetsInsetRect(rect, self.edgeInsets)];
重写这个方法就可以了.边距就是后面的edgeinsets
3951511839033_.pic.jpg
//令绘制区域为原始区域,增加的内边距区域不绘制
[super drawTextInRect:UIEdgeInsetsInsetRect(rect, self.edgeInsets)];
重写这个方法就可以了.边距就是后面的edgeinsets
3951511839033_.pic.jpg
本文标题:设置label的内边距
本文链接:https://www.haomeiwen.com/subject/bvusbxtx.html
网友评论