// // KWMLeftCategoryCell.m // iCemarose // // Created by HouWeiBin on 2017/6/13. // Copyright © 2017年 kollway. All rights reserved. // #import "KWMLeftCategoryCell.h" #import "UIColor+SAMAdditions.h" @interface KWMLeftCategoryCell() @property (nonatomic,weak) IBOutlet UIImageView *ivCategory; @property (nonatomic,weak) IBOutlet UILabel *lbTitle; @end @implementation KWMLeftCategoryCell - (void)awakeFromNib { [super awakeFromNib]; self.selectedBackgroundView = [[UIView alloc] initWithFrame:self.frame]; self.selectedBackgroundView.backgroundColor = [UIColor sam_colorWithHex:@"#F4F5F7"]; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; UIColor *textColor = selected?[UIColor sam_colorWithHex:@"#F1929A"]:[UIColor sam_colorWithHex:@"#545454"]; UIImage *image = selected?[UIImage imageNamed:@"test_category_s"]:[UIImage imageNamed:@"test_category"]; self.ivCategory.image = image; self.lbTitle.textColor = textColor; } @end