// // MSSAutoresizeLabelFlowCell.m // MSSAutoresizeLabelFlow // // Created by Mrss on 15/12/26. // Copyright © 2015年 expai. All rights reserved. // #import "MSSAutoresizeLabelFlowCell.h" #import "MSSAutoresizeLabelFlowConfig.h" #define JKColor(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)] @interface MSSAutoresizeLabelFlowCell () @property (nonatomic,strong) UILabel *titleLabel; @end @implementation MSSAutoresizeLabelFlowCell - (UILabel *)titleLabel { if (_titleLabel == nil) { _titleLabel = [[UILabel alloc]init]; _titleLabel.backgroundColor = [UIColor colorWithHex:0xF5F4F4]; _titleLabel.textColor = [UIColor colorWithHex:0x808080]; _titleLabel.font = [UIFont systemFontOfSize:13]; _titleLabel.layer.cornerRadius = 3; _titleLabel.layer.masksToBounds = YES; _titleLabel.textAlignment = NSTextAlignmentCenter; } return _titleLabel; } - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.backgroundColor=[UIColor colorWithHex:0xF5F4F4]; self.layer.cornerRadius=3; self.layer.masksToBounds=YES; [self.contentView addSubview:self.titleLabel]; } return self; } - (void)configCellWithTitle:(NSString *)title { self.titleLabel.frame = self.bounds; self.titleLabel.text = title; } @end