ScreeningFirstCollectionViewCell.m 1.49 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
    
28 29 30 31 32 33 34
 
    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];
曹云霄's avatar
曹云霄 committed
35
    [self.contentView addSubview:self.titleLabe];
36 37 38 39 40
    [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
41 42
    
}
43 44 45 46 47 48 49 50
#pragma mark -点击
- (void)ButtonClick
{
    if ([self.delegate respondsToSelector:@selector(SelectedButtonClickAction:)]) {
        
        [self.delegate SelectedButtonClickAction:_indexpath];
    }
}
曹云霄's avatar
曹云霄 committed
51 52

@end