|
//
// userInfoTextCell.m
// ThePaperDemo
//
// Created by scar1900 on 14/12/11.
// Copyright (c) 2014年 scar1900. All rights reserved.
//
#import "userInfoTextCell.h"
@interface userInfoTextCell()
@property(nonatomic, strong)UILabel *infoTextLabel;
@end
@implementation userInfoTextCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
[self addSubview:self.infoTextLabel];
[self layoutSubViews];
}
return self;
}
- (void)needrefreshSubNightMode {
_infoTextLabel.textColor = [UIColor colorWithHexString:TextGray];
}
- (void)layoutSubViews {
[self.titleLabel remakeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.top);
make.left.equalTo(self.left).offset(10);
make.width.mas_equalTo(@70);
}];
[self.infoTextLabel makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.top);
make.left.equalTo(self.left).offset(97);
make.bottom.equalTo(self.lineView.top);
make.right.equalTo(self.right).offset(-20);
}];
}
- (UILabel*)infoTextLabel {
if (!_infoTextLabel) {
_infoTextLabel = [[UILabel alloc]initWithFrame:CGRectZero];
_infoTextLabel.textAlignment = NSTextAlignmentLeft;
_infoTextLabel.textColor = [UIColor colorWithHexString:TextGray];
}
_infoTextLabel.font = appFont(TEXT_FIVE_LEVELSIZE, NO);
return _infoTextLabel;
}
- (void)setInfoText:(NSString *)text {
_infoText = text;
self.infoTextLabel.text = text;
}
- (void)configCanSelected:(BOOL)canSelected {
if (!canSelected) {
self.pushIcon.hidden = YES;
self.selectionStyle = UITableViewCellSelectionStyleNone;
}
}
- (void)awakeFromNib {
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
|