12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- //
- // FKBindTipView.m
- // FirstLink
- //
- // Created by jack on 15/11/3.
- // Copyright © 2015年 FirstLink. All rights reserved.
- //
- #import "FKBindTipCell.h"
- @interface FKBindTipCell ()
- @property (nonatomic, strong) UILabel *subLabel;
- @end
- @implementation FKBindTipCell
- - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
- if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
- self.contentView.backgroundColor = UIColorFromRGB(0xeeeeee);
- self.selectionStyle = UITableViewCellSelectionStyleNone;
- [self addAllSubviews];
- }
- return self;
- }
- - (void)addAllSubviews{
-
- UIView *realContentView = ({
- UIView *view = [[UIView alloc]init];
- view.backgroundColor = UIColorFromRGB(0xffffff);
- view;
- });
-
- [self.contentView addSubview:realContentView];
- [realContentView addSubview:self.iconImgView];
- [realContentView addSubview:self.titleLabel];
- [realContentView addSubview:self.subLabel];
-
- [realContentView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.edges.insets(UIEdgeInsetsMake(0, 0, 10, 0));
- }];
-
- [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.bottom.equalTo(realContentView.mas_centerY).offset(- 5);
- make.centerX.equalTo(realContentView).offset(10);
- }];
-
- [self.iconImgView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.right.equalTo(self.titleLabel.mas_left).offset(- 5);
- make.centerY.equalTo(self.titleLabel);
- }];
-
- [self.subLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.equalTo(realContentView.mas_centerY).offset(5);
- make.centerX.equalTo(realContentView);
- }];
-
- }
- #pragma mark - property
- - (UILabel *)titleLabel{
- if (_titleLabel == nil) {
- _titleLabel = [[UILabel alloc]init];
- _titleLabel.font = [UIFont systemFontOfSize:16];
- _titleLabel.textColor = UIColorFromRGB(0x333333);
- }
- return _titleLabel;
- }
- - (UILabel *)subLabel{
- if (_subLabel == nil) {
- _subLabel = [[UILabel alloc]init];
- _subLabel.font = [UIFont systemFontOfSize:14];
- _subLabel.textColor = UIColorFromRGB(0x999999);
- _subLabel.text = @"(身份证信息务必与收货人信息一致哦)";
- }
- return _subLabel;
- }
- - (UIImageView *)iconImgView{
- if (_iconImgView == nil) {
- _iconImgView = [[UIImageView alloc]init];
- }
- return _iconImgView;
- }
- @end
|