//
//  BtnCollectionViewCell.m
//  butcollection
//
//  Created by 迟国强 on 2016/12/29.
//  Copyright © 2016年 迟国强. All rights reserved.
//

#import "BtnCollectionViewCell.h"

@interface BtnCollectionViewCell ()
@end

@implementation BtnCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.imageview = [[UIImageView alloc]init];
        self.backgroundView = self.imageview;
        [self.contentView addSubview:self.imageview];
        self.contentView.backgroundColor = [UIColor whiteColor];
        self.layer.borderWidth = 2;
        self.layer.borderColor = [UIColor whiteColor].CGColor;
        self.layer.cornerRadius = 5;
        self.layer.masksToBounds = YES;

    }
    return self;
}
- (UILabel *)lable{
    if (!_lable) {
        _lable = [[UILabel alloc]initWithFrame:self.contentView.bounds];
        _lable.font = [UIFont systemFontOfSize:13];
        _lable.textAlignment = NSTextAlignmentCenter;
        _lable.textColor = [UIColor blackColor];
        [self.contentView addSubview:_lable];
    }
    _lable.frame = CGRectMake(CGRectGetMinX(self.contentView.bounds), CGRectGetMinY(self.contentView.bounds), self.bounds.size.width, self.bounds.size.height);
    return _lable;
}
-(UIImageView *)imageview
{
    if (!_imageview) {
        
        
        
    }
    return _imageview;

}


- (void)setLableText:(NSString *)lableText{
    _lableText = lableText;
    self.lable.text = lableText;
}




- (void)prepareForReuse{
    [super prepareForReuse];
    _lable.frame = self.contentView.frame;
    _lable.textColor = [UIColor blackColor];
    _imageview.frame =self.contentView.frame;

}
@end
