SelectedTableViewCell.m 1.44 KB
//
//  SelectedTableViewCell.m
//  SCIOLiveCN
//
//  Created by huayu on 16/12/9.
//  Copyright © 2016年 huayu. All rights reserved.
//

#import "SelectedTableViewCell.h"

@implementation SelectedTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        
        _bgView = [[UIView alloc] initWithFrame:CGRectMake(12, 5, MainScreenWidth - 24, 56)];
        _bgView.backgroundColor = [UIColor whiteColor];
        _bgView.layer.masksToBounds = YES;
        _bgView.layer.cornerRadius = 6.0;
        [self addSubview:_bgView];
        
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, _bgView.frame.size.width - 20, 56)];
        _titleLabel.numberOfLines = 2;
        _titleLabel.backgroundColor = [UIColor clearColor];
        _titleLabel.textColor = [UIColor whiteColor];
        _titleLabel.font = [UIFont systemFontOfSize:15];
        [_bgView addSubview:_titleLabel];
        
        _playImage = [[UIImageView alloc] initWithFrame:CGRectMake(_bgView.frame.size.width - 37.5, (56 - 27.5)/2, 27.5, 27.5)];
        [_bgView addSubview:_playImage];
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end