|
//
// 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.text = @"暂无动态";
_noData.textAlignment = NSTextAlignmentCenter;
_noData.backgroundColor = [UIColor clearColor];
}
return _noData;
}
-(void)layoutSubviews{
[super layoutSubviews];
self.noData.frame = CGRectMake(0, 190, CGRectGetWidth(self.contentView.bounds), 30);
}
@end
|