热更新demo

hotAskFootCell.m 1.6KB

    // // hotAskFootCell.m // ThePaperDemo // // Created by scar1900 on 14/10/30. // Copyright (c) 2014年 scar1900. All rights reserved. // #import "hotAskFootCell.h" @interface hotAskFootCell() @property(nonatomic, strong)UIView *backView; @property(nonatomic, strong)UIView *lineView; @end @implementation hotAskFootCell - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { self.selectionStyle = UITableViewCellSelectionStyleNone; self.backgroundColor = [UIColor colorWithHexString:CELLBACKCOLOR]; [self addSubview:self.backView]; [self.backView addSubview:self.lineView]; }return self; } - (UIView*)backView { if (!_backView) { _backView = [[UIView alloc]initWithFrame:CGRectZero]; _backView.backgroundColor = [UIColor whiteColor]; } return _backView; } - (UIView*)lineView { if (!_lineView) { _lineView = [[UIView alloc]initWithFrame:CGRectZero]; _lineView.backgroundColor = [UIColor colorWithHexString:LINECOLOR]; } return _lineView; } - (void)layoutSubviews { [super layoutSubviews]; self.backView.frame =CGRectMake(10, 0, CGRectGetWidth(self.bounds)-20, 10); self.lineView.frame =CGRectMake(0, CGRectGetHeight(self.backView.bounds)-1, CGRectGetWidth(self.backView.bounds), 1); } - (void)awakeFromNib { // Initialization code } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } @end