ScreeningFirstCollectionViewCell.m 1.39 KB
Newer Older
曹云霄's avatar
曹云霄 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
//
//  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
{
曹云霄's avatar
曹云霄 committed
27
    
勾芒's avatar
勾芒 committed
28
     self.titleLabe = [UIButton buttonWithType:UIButtonTypeCustom];
29 30
    self.titleLabe.frame = self.contentView.frame;
    [self.titleLabe setTitleColor:kMainBlueColor forState:UIControlStateNormal];
勾芒's avatar
勾芒 committed
31
    [self.titleLabe setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];
32
    self.titleLabe.titleLabel.font = [UIFont systemFontOfSize:12];
曹云霄's avatar
曹云霄 committed
33
    [self.contentView addSubview:self.titleLabe];
34 35 36 37 38
    [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;
曹云霄's avatar
曹云霄 committed
39 40
    
}
41 42 43 44 45 46 47 48
#pragma mark -点击
- (void)ButtonClick
{
    if ([self.delegate respondsToSelector:@selector(SelectedButtonClickAction:)]) {
        
        [self.delegate SelectedButtonClickAction:_indexpath];
    }
}
曹云霄's avatar
曹云霄 committed
49 50

@end