You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

48 lines
1.4 KiB

//
// NewCollectionViewCell.m
// tongxin
//
// Created by WeiChaoZheng on 2018/6/27.
// Copyright © 2018年 xTT. All rights reserved.
//
#import "NewCollectionViewCell.h"
@interface NewCollectionViewCell ()
@property (nonatomic ,weak) UIImageView *selectImg;
@end
@implementation NewCollectionViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
self.imageVIew.layer.cornerRadius = self.imageVIew.size.height/2;
self.imageVIew.layer.masksToBounds = YES;
UIImageView *selectImg = [UICommon ui_imageView:CGRectZero fileName:@"选中"];
selectImg.hidden = YES;
self.selectImg = selectImg;
[self.contentView addSubview:selectImg];
[selectImg mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.imageVIew.mas_right);
make.bottom.equalTo(self.imageVIew.mas_bottom);
make.size.mas_equalTo(selectImg.image.size);
}];
}
-(void)setSelectWithThisItem:(BOOL)isSelect{
if (isSelect) {
self.nameLabel.textColor = mainColor;
self.imageVIew.layer.borderWidth = 1.5;
self.imageVIew.layer.borderColor = mainColor.CGColor;
self.selectImg.hidden = NO;
}else{
self.nameLabel.textColor = KKGrey102;
self.imageVIew.layer.borderWidth = 0;
self.imageVIew.layer.borderColor = KKClearColor.CGColor;
self.selectImg.hidden = YES;
}
}
@end