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

#import "NewVoiceTableViewCell.h"

@implementation NewVoiceTableViewCell

- (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, 66)];
        _bgView.backgroundColor = [UIColor whiteColor];
        [self addSubview:_bgView];
        
        _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, _bgView.frame.size.width - 20, 40)];
        _titleLabel.numberOfLines = 2;
        _titleLabel.backgroundColor = [UIColor blueColor];
        _titleLabel.textColor = HEXCOLOR(0x333333);
        _titleLabel.font = [UIFont systemFontOfSize:16];
        [_bgView addSubview:_titleLabel];
        
        _timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 45, _bgView.frame.size.width - 80, 10)];
        _timeLabel.backgroundColor = [UIColor redColor];
        _timeLabel.textColor = HEXCOLOR(0x666666);
        _timeLabel.font = [UIFont systemFontOfSize:12];
        [_bgView addSubview:_timeLabel];
        
        _soundImage = [[UIImageView alloc] initWithFrame:CGRectMake(_bgView.frame.size.width - 70, 45, 11, 11)];
        [_bgView addSubview:_soundImage];
        
        _lengthLabel = [[UILabel alloc] initWithFrame:CGRectMake(_bgView.frame.size.width - 50, 45, 40, 10)];
        _lengthLabel.backgroundColor = [UIColor clearColor];
        _lengthLabel.textColor = HEXCOLOR(0x666666);
        _lengthLabel.font = [UIFont systemFontOfSize:12];
        [_bgView addSubview:_lengthLabel];
    }
    return self;
}

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

    // Configure the view for the selected state
}

@end