IBTUILabel.m 1.2 KB
Newer Older
mei's avatar
mei committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
//
//  IBTUILabel.m
//  IBTTableViewKit
//
//  Created by Xummer on 15/1/7.
//  Copyright (c) 2015年 Xummer. All rights reserved.
//

#import "IBTUILabel.h"

@implementation IBTUILabel

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (!self) {
        return nil;
    }
    
    self.backgroundColor = [UIColor clearColor];
    
    return self;
}

freecui's avatar
freecui committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
- (instancetype)initWithFrame:(CGRect)frame
                         Text: (NSString *)text
                 textAligment: (NSTextAlignment)textAlignment
              backgroundColor: (UIColor *)bgColor
                    textColor: (UIColor *)textColor
                         font: (UIFont *)font
{
    self = [super initWithFrame:frame];
    if (!self) {
        return nil;
    }
   // IBTUILabel *lbl = [[IBTUILabel alloc]initWithFrame:frame];
    self.text = text;
    self.textAlignment = textAlignment;
    self.backgroundColor = bgColor;
    self.textColor = textColor;
    self.font = font;
    
    return self;
}


    /*
mei's avatar
mei committed
47 48 49 50 51 52 53 54
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end