// // PdRightArrowTableViewCell.m // FirstLink // // Created by 王孝道 on 15/6/2. // Copyright (c) 2015年 FirstLink. All rights reserved. // #import "SubmitCarriageMoneyCell.h" @interface SubmitCarriageMoneyCell () @property (nonatomic, strong) UIImageView *rightArrowImgView; @end @implementation SubmitCarriageMoneyCell @synthesize rightLabel = _rightLabel; @synthesize rightArrowImgView = _rightArrowImgView; - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { [self initialize]; self.selectionStyle = UITableViewCellSelectionStyleNone; } return self; } - (void)initialize { [self.contentView addSubview:self.rightArrowImgView]; [self.contentView addSubview:self.rightLabel]; [self.rightArrowImgView mas_makeConstraints:^(MASConstraintMaker *make) { make.right.equalTo(self.contentView).offset(- 10); make.centerY.equalTo(self.contentView); }]; [self.rightLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.centerY.equalTo(self.contentView); make.right.equalTo(self.rightArrowImgView.mas_left); }]; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } #pragma mark - getter && setter - (UILabel *)rightLabel { if (_rightLabel == nil) { _rightLabel = [[UILabel alloc]init]; _rightLabel.backgroundColor = [UIColor clearColor]; _rightLabel.font = [UIFont systemFontOfSize:13]; _rightLabel.textColor = UIColorFromRGB(0x333333); _rightLabel.textAlignment = NSTextAlignmentRight; } return _rightLabel; } - (UIImageView *)rightArrowImgView { if (_rightArrowImgView == nil) { _rightArrowImgView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"Alpha3_more_icon"]]; } return _rightArrowImgView; } @end