| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- //
- // ReviseinfoCell.m
- // jitao
- //
- // Created by 罗云飞 on 2017/12/7.
- // Copyright © 2017年 罗云飞. All rights reserved.
- //
- #import "ReviseinfoCell.h"
- @implementation ReviseinfoCell
- - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
-
- self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
- if (self) {
- self.backgroundColor = NewWhiteColor;
- _image = [UIImageView new];
- [self.contentView addSubview:_image];
-
- _image.sd_layout
- .leftSpaceToView(self.contentView, fitScreenWidth(12))
- .centerYEqualToView(self.contentView)
- .heightIs(fitScreenWidth(13))
- .widthIs(fitScreenWidth(13));
-
- _name = [UILabel new];
- _name.font = NewFont(fitScreenWidth(14));
- [_name setSingleLineAutoResizeWithMaxWidth:0];
- _name.textColor = NewBlackColor;
- [self.contentView addSubview:_name];
-
- _name.sd_layout
- .leftSpaceToView(_image, 10)
- .centerYEqualToView(self.contentView)
- .heightIs(fitScreenHeight(13));
-
- _seedetails = [UILabel new];
- _seedetails.textColor = [UIColor colorWithString:@"#9A9A9A"];
- _seedetails.font = NewFont(fitScreenWidth(12));
- [_seedetails setSingleLineAutoResizeWithMaxWidth:0];
- [self.contentView addSubview:_seedetails];
-
- _seedetails.sd_layout
- .centerYEqualToView(self.contentView)
- .rightSpaceToView(self.contentView, 30)
- .heightIs(fitScreenHeight(12));
-
- _line = [UILabel new];
- _line.backgroundColor = NewLineGrayColor;
- [self.contentView addSubview:_line];
-
- _line.sd_layout
- .bottomEqualToView(self.contentView)
- .leftEqualToView(self.contentView)
- .rightEqualToView(self.contentView)
- .heightIs(0.6);
-
- UIImageView *backimage = [UIImageView new];
- [backimage setImage:[UIImage imageNamed:@"括号"]];
- // backimage.backgroundColor = NewRedColor;
- [self.contentView addSubview:backimage];
-
- backimage.sd_layout
- .rightSpaceToView(self.contentView, 15)
- .centerYEqualToView(self.contentView)
- .heightIs(fitScreenWidth(13))
- .widthIs(fitScreenWidth(7));
-
- }
- return self;
- }
- - (void)assignment:(NSDictionary *)model {
- [_name setText:model[@"nameKey"]];
- _seedetails.text = model[@"info"];
- [_image setImage:[UIImage imageNamed:model[@"imageKey"]]];
-
- }
- - (void)awakeFromNib {
- [super awakeFromNib];
- // Initialization code
- }
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
- // Configure the view for the selected state
- }
- @end
|