// // KWMSuitCell.m // iCemarose // // Created by HouWeiBin on 2017/6/5. // Copyright © 2017年 kollway. All rights reserved. // #import "KWMClothingSetsCell.h" #import "KWMStringUtil.h" #import "KWMImageUtil.h" #import "UIImageView+WebCache.h" @interface KWMClothingSetsCell() @property(nonatomic,weak) IBOutlet UILabel *lbName; @property(nonatomic,weak) IBOutlet UILabel *lbPrice; @property(nonatomic,weak) IBOutlet UIImageView *ivProduct; @end @implementation KWMClothingSetsCell - (void)awakeFromNib { [super awakeFromNib]; } -(void)setProduct:(BUYProduct *)product{ _product = product; if(product){ NSString *imageUrl = [KWMImageUtil getProductImageUrl:product ImageSize:SmallImage]; NSURL *imageURL = [NSURL URLWithString:imageUrl]; [self.ivProduct sd_setImageWithURL:imageURL placeholderImage:[UIImage imageNamed:@"ic_loading"]]; self.lbName.text = product.title; if(product.variantsArray.count>0){ BUYProductVariant *variant = product.variantsArray.firstObject; self.lbPrice.text = [KWMStringUtil price:variant.price]; } } } @end