ScreeningSecondCollectionReusableView.m 2.31 KB
//
//  ScreeningSecondCollectionReusableView.m
//  Lighting
//
//  Created by 曹云霄 on 16/5/10.
//  Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//

#import "ScreeningSecondCollectionReusableView.h"


#define WIDTH self.frame.size.width
#define HEIGHT self.frame.size.height
@implementation ScreeningSecondCollectionReusableView



- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        [self uiConfigAction];
    }
    return self;
}


#pragma mark -UI
- (void)uiConfigAction
{
    
    self.alltitleButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.alltitleButton.layer.masksToBounds = YES;
    self.alltitleButton.layer.cornerRadius = kCornerRadius;
    [self.alltitleButton setTitle:@"全部" forState:UIControlStateNormal];
    [self addSubview:self.alltitleButton];
    self.alltitleButton.titleLabel.font = [UIFont systemFontOfSize:12];
    [self.alltitleButton setTitleColor:kMainBlueColor forState:UIControlStateNormal];
    [self.alltitleButton setBackgroundImage:TCImage(@"kamincolor") forState:UIControlStateHighlighted];
    [self.alltitleButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
    self.alltitleButton.layer.masksToBounds = YES;
    self.alltitleButton.layer.cornerRadius = kCornerRadius;
    self.alltitleButton.layer.borderWidth = 1;
    self.alltitleButton.layer.borderColor = kMainBlueColor.CGColor;
    [self.alltitleButton mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.size.mas_equalTo(CGSizeMake((WIDTH-127)/3, 35));
        make.right.equalTo(self.mas_right).offset(-30);
        make.top.equalTo(self.mas_top).offset(20);
    }];
    
    //副标题按钮
    self.subTitleButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.subTitleButton setTitle:@"副标题" forState:UIControlStateNormal];
    [self addSubview:self.subTitleButton];
    self.subTitleButton.titleLabel.font = [UIFont systemFontOfSize:12];
    [self.subTitleButton setTitleColor:kMainBlueColor forState:UIControlStateNormal];
    [self.subTitleButton mas_makeConstraints:^(MASConstraintMaker *make) {

        make.size.mas_equalTo(CGSizeMake((WIDTH-127)/3, 35));
        make.right.equalTo(self.mas_right).offset(-30);
        make.top.equalTo(self.mas_top).offset(75);
    }];
    
}





@end