| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- //
- // HangYeCell.m
- // jitao
- //
- // Created by 罗云飞 on 2018/1/19.
- // Copyright © 2018年 罗云飞. All rights reserved.
- //
- #import "HangYeCell.h"
- @implementation HangYeCell
- - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
-
- self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
- if (self) {
- _title = [UILabel new];
- _title.font = NewFont(fitScreenWidth(12));
- [_title setSingleLineAutoResizeWithMaxWidth:0];
- _title.text = @"行业";
- [self.contentView addSubview:_title];
- _title.sd_layout
- .leftSpaceToView(self.contentView, 15)
- .heightIs(fitScreenWidth(44))
- .topSpaceToView(self.contentView, 10);
-
- _industry = [UIButton new];
- [_industry setTitleColor:[UIColor colorWithString:@"#A1A1A1"] forState:UIControlStateNormal];
- _industry.titleLabel.font = NewFont(fitScreenWidth(12));
- [_industry setBackgroundColor:[UIColor colorWithString:@"#ECECEC"]];
- _industry.tag = 100;
- [self.contentView addSubview:_industry];
-
- _industry.sd_layout
- .topSpaceToView(self.contentView, 10)
- .leftSpaceToView(self.contentView, 60)
- .heightIs(fitScreenWidth(44))
- .widthIs((SCREEN_WIDTH-60-25)/2);
-
- _industry1 = [UIButton new];
- [_industry1 setTitle:@"行业二级" forState:UIControlStateNormal];
- [_industry1 setTitleColor:[UIColor colorWithString:@"#A1A1A1"] forState:UIControlStateNormal];
- _industry1.titleLabel.font = NewFont(fitScreenWidth(12));
- [_industry1 setBackgroundColor:[UIColor colorWithString:@"#ECECEC"]];
- _industry1.tag = 101;
- [self.contentView addSubview:_industry1];
-
- _industry1.sd_layout
- .topSpaceToView(self.contentView, 10)
- .leftSpaceToView(_industry, 10)
- .heightIs(fitScreenWidth(44))
- .widthIs((SCREEN_WIDTH-60-25)/2);
- }
- return self;
- }
- - (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
|