123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // FKSubmitProductHeaderView.m
- // FirstLink
- //
- // Created by jack on 16/1/27.
- // Copyright © 2016年 FirstLink. All rights reserved.
- //
- #import "FKSubmitProductHeaderView.h"
- @implementation FKSubmitProductHeaderView
- - (instancetype)initWithFrame:(CGRect)frame{
- if (self = [super initWithFrame:frame]) {
- [self addAllSubviews];
- }
- return self;
- }
- - (void)addAllSubviews{
-
- self.backgroundColor = [UIColor whiteColor];
-
- UIView *bottomLine = [[UIView alloc]init];
- bottomLine.backgroundColor = UIColorFromRGB(0xe5e5e5);
-
- [self addSubview:self.titleLabel];
- [self addSubview:bottomLine];
-
- [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.equalTo(self).offset(15);
- make.centerY.equalTo(self);
- }];
-
- [bottomLine mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.equalTo(self).offset(15);
- make.right.bottom.equalTo(self);
- make.height.mas_equalTo(0.5);
- }];
- }
- - (UILabel *)titleLabel{
- if (_titleLabel == nil) {
- _titleLabel = [[UILabel alloc]init];
- _titleLabel.font = [UIFont systemFontOfSize:14];
- _titleLabel.textColor = UIColorFromRGB(0x333333);
- }
- return _titleLabel;
- }
- @end
|