123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- //
- // FKExploreModeCell.m
- // FirstLink
- //
- // Created by ascii on 16/2/18.
- // Copyright © 2016年 FirstLink. All rights reserved.
- //
- #import "FKExploreMoreCell.h"
- @interface FKExploreMoreCell ()
- @end
- @implementation FKExploreMoreCell
- - (instancetype)initWithFrame:(CGRect)frame {
- if (self = [super initWithFrame:frame]) {
- [self addAllSubviews];
- }
- return self;
- }
- - (void)addAllSubviews {
- self.bgView = [self makeBoxView];
- [self.contentView addSubview:self.bgView];
- [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.right.equalTo(self.contentView);
- make.top.equalTo(self.contentView).offset(10);
- make.height.equalTo(self.contentView.mas_width);
- }];
-
- UIView *line = [UIView new];
- line.backgroundColor = UIColorFromRGB(0x999999);
- [self.bgView addSubview:line];
- [line mas_makeConstraints:^(MASConstraintMaker *make) {
- make.center.equalTo(self.bgView);
- make.width.mas_equalTo(60);
- make.height.mas_equalTo(1);
- }];
-
- UILabel *upLabel = [self makeTitleLabel];
- upLabel.font = [UIFont systemFontOfSize:15];
- upLabel.textColor = UIColorFromRGB(0xFF624A);
- upLabel.text = @"查看更多";
-
- [self.bgView addSubview:upLabel];
- [upLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerX.equalTo(self.bgView);
- make.bottom.equalTo(line.mas_top).offset(-4);
- }];
-
- UILabel *bollowLabel = [self makeTitleLabel];
- bollowLabel.font = [UIFont systemFontOfSize:14];
- bollowLabel.textColor = UIColorFromRGB(0x999999);
- bollowLabel.text = @"See More";
-
- [self.bgView addSubview:bollowLabel];
- [bollowLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerX.equalTo(self.bgView);
- make.top.equalTo(line.mas_bottom).offset(4);
- }];
- }
- - (void)remakeEdgesZero {
- [self.bgView mas_remakeConstraints:^(MASConstraintMaker *make) {
- make.left.right.equalTo(self.contentView);
- make.top.equalTo(self.contentView).offset(0);
- make.height.equalTo(self.contentView.mas_width);
- }];
- }
- - (UIView *)makeBoxView {
- UIView *boxView = [UIView new];
- boxView.layer.borderWidth = 1.0/[UIScreen mainScreen].scale;
- boxView.layer.borderColor = UIColorFromRGB(0xe5e5e5).CGColor;
- return boxView;
- }
- - (UILabel *)makeTitleLabel {
- UILabel *label = [UILabel new];
- label.textAlignment = NSTextAlignmentCenter;
- return label;
- }
- @end
|