热更新demo

otherPersonNoDataCell.m 1.6KB

    // // otherPersonNoDataCell.m // ThePaperHD // // Created by liyuan on 15/7/14. // Copyright (c) 2015年 scar1900. All rights reserved. // #import "otherPersonNoDataCell.h" @interface otherPersonNoDataCell() @property(nonatomic,strong)UILabel *noData; @end @implementation otherPersonNoDataCell - (void)awakeFromNib { // Initialization code } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { self.backgroundColor = [UIColor colorWithHexString:BackGroundColor]; self.selectionStyle = UITableViewCellSelectionStyleNone; [self.contentView addSubview:self.noData]; } return self; } -(UILabel *)noData{ if (!_noData) { _noData = [[UILabel alloc]initWithFrame:CGRectZero]; _noData.textColor = [UIColor colorWithHexString:TextLightGray]; _noData.font = appFont(TEXT_FOUR_LEVELSIZE, NO); _noData.text = @"暂无动态"; _noData.textAlignment = NSTextAlignmentCenter; _noData.backgroundColor = [UIColor clearColor]; } return _noData; } -(void)layoutSubviews{ [super layoutSubviews]; [self.noData makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.contentView.left); make.right.equalTo(self.contentView.right); make.top.equalTo(@125); make.height.equalTo(30); }]; } @end