KWMShippingCell.m 1.18 KB
Newer Older
houweibin committed
1 2 3 4 5 6 7 8 9 10
//
//  KWMShippingCell.m
//  iCemarose
//
//  Created by HouWeiBin on 2016/11/4.
//  Copyright © 2016年 kollway. All rights reserved.
//

#import "KWMShippingCell.h"
#import "KWMStringUtil.h"
lee committed
11
#import "KWMCurrencyUtil.h"
houweibin committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41

@implementation KWMShippingCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setShipSelected:(BOOL)selected{
    UIImage *selectImage = [UIImage imageNamed:@"ic_shipping_2"];
    UIImage *unSelectImage = [UIImage imageNamed:@"ic_shipping_1"];
    if(selected){
        self.ivSelect.image = selectImage;
    }else{
        self.ivSelect.image = unSelectImage;
    }
}

-(void)setData:(BUYShippingRate *)shippingRate{
    if(shippingRate == nil){
        return;
    }
    self.shippingRate = shippingRate;
    self.lbTitle.text = shippingRate.title;
lee committed
42 43
//    self.lbPrice.text = [NSString stringWithFormat:@"¥%@",[KWMStringUtil getEUR2CNYstring:shippingRate.price]];
    self.lbPrice.text = [[KWMCurrencyUtil sharedInstance] priceFormattedByCurrencyCode:shippingRate.price];
houweibin committed
44 45 46
}

@end