澎湃iPad上线版本

userInfoTextCell.m 1.6KB

    // // 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 @synthesize infoText = _infoText; - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { [self.contentView addSubview:self.infoTextLabel]; } return self; } - (UILabel*)infoTextLabel { if (!_infoTextLabel) { _infoTextLabel = [[UILabel alloc]initWithFrame:CGRectZero]; _infoTextLabel.textAlignment = NSTextAlignmentLeft; _infoTextLabel.textColor = [UIColor colorWithHexString:TextLightGray]; _infoTextLabel.backgroundColor = [UIColor clearColor]; } _infoTextLabel.font = appFont(15, NO); return _infoTextLabel; } - (void)setInfoText:(NSString *)text { _infoText = text; self.infoTextLabel.text = text; } - (void)layoutSubviews { [super layoutSubviews]; self.titleLabel.frame =CGRectMake(15, 0, 90, CGRectGetHeight(self.bounds)); self.infoTextLabel.frame = CGRectMake(120, 0, CGRectGetWidth(self.bounds)-120, CGRectGetHeight(self.bounds)); [self.contentView bringSubviewToFront:self.pushIcon]; } - (void)awakeFromNib { // Initialization code } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } @end