设置 UILabel 距离边框的距离

要更改 Label 距离边框的距离就须要自定义 Label,完了重写该方法spa


/*   距离左5个单位,距离上5个单位*/3d

-(void)drawTextInRect:(CGRect)rect{orm

    

    CGRect frame = CGRectMake(rect.origin.x + 5, rect.origin.y + 5, rect.size.width - 10, rect.size.height -10);方法

    [super drawTextInRect:frame];di


}co