// // SPHomepageGiftCell.m // SweetParty // // Created by bj_szd on 2022/6/2. // #import "SPHomepageGiftCell.h" #import "SPMostGiftsView.h" @implementation SPHomepageGiftCell - (void)awakeFromNib { [super awakeFromNib]; WEAK_SELF [self.maxHeadImgV dg_Tapped:^{ SPMostGiftsView *view = LoadNib(@"SPMostGiftsView"); view.frame = [UIScreen mainScreen].bounds; [KEYWINDOW addSubview:view]; view.dataDict = weakSelf.model.max_gift_num_user; }]; } - (void)setModel:(SPHomepageGiftModel *)model { _model = model; [self.imgV sd_setImageWithURL:[NSURL URLWithString:model.base_image]]; self.nameLab.text = model.gift_name; self.priceLab.text = model.gift_price; self.numLab.text = [NSString stringWithFormat:@"x%@", model.num]; [self.maxHeadImgV sd_setImageWithURL:[NSURL URLWithString:[model.max_gift_num_user safeStringForKey:@"head_pic"]]]; [self.numBgView layoutIfNeeded]; // [self.numBgView styleGradiBlueColor]; } @end