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

#import "ScreeningFirstCollectionViewCell.h"

@implementation ScreeningFirstCollectionViewCell


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


#pragma mark -布局
- (void)uiConfigAction
{
    
 
    self.titleLabe = [UIButton buttonWithType:UIButtonTypeCustom];
    self.titleLabe.frame = self.contentView.frame;
    [self.titleLabe setTitleColor:kMainBlueColor forState:UIControlStateNormal];
    [self.titleLabe setBackgroundImage:TCImage(@"kamincolor") forState:UIControlStateHighlighted];
    [self.titleLabe setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
    self.titleLabe.titleLabel.font = [UIFont systemFontOfSize:12];
    [self.contentView addSubview:self.titleLabe];
    [self.titleLabe addTarget:self action:@selector(ButtonClick) forControlEvents:UIControlEventTouchUpInside];
    self.titleLabe.layer.masksToBounds = YES;
    self.titleLabe.layer.cornerRadius = kCornerRadius;
    self.titleLabe.layer.borderWidth = 1;
    self.titleLabe.layer.borderColor = kMainBlueColor.CGColor;
    
}
#pragma mark -点击
- (void)ButtonClick
{
    if ([self.delegate respondsToSelector:@selector(SelectedButtonClickAction:)]) {
        
        [self.delegate SelectedButtonClickAction:_indexpath];
    }
}

@end
