CNliveCollectionViewCell.m 1005 Bytes
//
//  CNliveCollectionViewCell.m
//  CNLiveVideoClassifyKit_Example
//
//  Created by CNLive on 2021/8/7.
//  Copyright © 2021 杨苓玉. All rights reserved.
//

#import "CNliveCollectionViewCell.h"

@interface CNliveCollectionViewCell()
@property (nonatomic, strong)UILabel *titleLabel;
@end

@implementation CNliveCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.contentView.backgroundColor = [UIColor lightGrayColor];
        [self.contentView addSubview:self.titleLabel];
    }
    return self;
}
-(void)setTitleName:(NSString *)titleName
{
    self.titleLabel.text = titleName;
}
- (UILabel *)titleLabel
{
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height)];
        _titleLabel.textColor = [UIColor blueColor];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _titleLabel;
}
@end