@interface SubLabel : UILabel
@property (nonatomic, assign) UIEdgeInsets insets;
@end
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
self.insets = UIEdgeInsetsMake(0.0f, 0.0f, 0.0f, 0.0f);
}
returnself;
}
- (void)drawTextInRect:(CGRect)rect
{
UIEdgeInsets insets = _insets;
[superdrawTextInRect:UIEdgeInsetsInsetRect(rect, insets)];
}