// // AboutNewsCell.m // ThePaperBase // // Created by zhousan on 15/8/21. // Copyright (c) 2015年 scar1900. All rights reserved. // #import "AboutNewsCell.h" @interface AboutNewsCell () @property(nonatomic, strong)UILabel *aboutNewsLabel; @end @implementation AboutNewsCell - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { self.contentView.backgroundColor = [UIColor clearColor]; self.backgroundColor = [UIColor clearColor]; [self.contentView addSubview:self.aboutNewsLabel]; self.selectionStyle = UITableViewCellSelectionStyleNone; } return self; } - (void)setTitleStr:(NSString *)titleStr { _aboutNewsLabel.text = titleStr; } - (UILabel*)aboutNewsLabel { if (!_aboutNewsLabel) { _aboutNewsLabel = [[UILabel alloc]initWithFrame:CGRectZero]; _aboutNewsLabel.textColor = [UIColor whiteColor]; _aboutNewsLabel.font = appFont(10, NO); _aboutNewsLabel.textAlignment = NSTextAlignmentCenter; _aboutNewsLabel.backgroundColor = [UIColor colorWithHexString:@"0x8f9ea3"]; } return _aboutNewsLabel; } - (void)layoutSubviews { self.aboutNewsLabel.frame = CGRectMake(10, 0, rect_screen.size.width-20, 20); [super layoutSubviews]; } - (void)awakeFromNib { // Initialization code } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } @end