ProductScreeningCollectionViewCell.m 919 Bytes
Newer Older
勾芒's avatar
勾芒 committed
1 2 3 4 5 6 7 8 9 10 11 12
//
//  ProductScreeningCollectionViewCell.m
//  Lighting
//
//  Created by 曹云霄 on 16/6/2.
//  Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//

#import "ProductScreeningCollectionViewCell.h"

@implementation ProductScreeningCollectionViewCell

勾芒's avatar
勾芒 committed
13 14 15 16 17 18 19
- (void)setModel:(TOGoodsEntityModel *)model
{
    _model = model;
    NSArray *images = [_model.pictures componentsSeparatedByString:@","];
    [self.goodsImageView sd_setImageWithURL:[NSURL URLWithString:[images firstObject]] placeholderImage:REPLACEIMAGE];
    self.goodsName.text = _model.name;
    self.goodsSpecifications.text = _model.code;
曹云霄's avatar
曹云霄 committed
20
    self.goodsPrice.text = [NSString stringWithFormat:@"¥%.2f",[_model.tagPrice floatValue]];
勾芒's avatar
勾芒 committed
21 22 23 24 25 26 27
    if (model.isSelectedState) {
        self.layer.borderWidth = 2.0f;
        self.layer.borderColor = kMainBlueColor.CGColor;
    }else
    {
        self.layer.borderWidth = 0.f;
    }
勾芒's avatar
勾芒 committed
28
}
勾芒's avatar
勾芒 committed
29 30

@end