53 lines
1.5 KiB
Objective-C
Executable File
53 lines
1.5 KiB
Objective-C
Executable File
//
|
|
// SPMostGiftsView.m
|
|
// YaYin
|
|
//
|
|
// Created by bj_szd on 2023/7/12.
|
|
// Copyright © 2023 YaYin. All rights reserved.
|
|
//
|
|
|
|
#import "SPMostGiftsView.h"
|
|
|
|
@interface SPMostGiftsView ()
|
|
|
|
@property (weak, nonatomic) IBOutlet UIView *containerView;
|
|
@property (weak, nonatomic) IBOutlet UIButton *knowBtn;
|
|
|
|
@end
|
|
|
|
@implementation SPMostGiftsView
|
|
|
|
- (void)awakeFromNib {
|
|
[super awakeFromNib];
|
|
|
|
[self createUI];
|
|
}
|
|
|
|
- (void)createUI {
|
|
WEAK_SELF
|
|
[self.touchImgV dg_Tapped:^{
|
|
[weakSelf removeFromSuperview];
|
|
}];
|
|
// self.containerView.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(ScreenWidth, 300) direction:FXGradientChangeDirectionVertical startColor:HEXCOLOR(0xD9CDFF) endColor:HEXCOLOR(0xFFFFFF)];
|
|
self.knowBtn.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(ScreenWidth-34*2, 48) direction:FXGradientChangeDirectionHorizontal startColor:mainLightColor endColor:mainDeepColor];
|
|
}
|
|
|
|
- (void)setDataDict:(NSDictionary *)dataDict {
|
|
_dataDict = dataDict;
|
|
|
|
//制作人
|
|
NSString *nick_name1 = [dataDict safeStringForKey:@"nick_name"];
|
|
NSString *head_pic1 = [dataDict safeStringForKey:@"head_pic"];
|
|
[self.avatarImgV_1 sd_setImageWithURL:[NSURL URLWithString:head_pic1] placeholderImage:kDefaultUserIcon];
|
|
self.nicknameLab_1.text = nick_name1;
|
|
|
|
self.numLab.text = [NSString stringWithFormat:@"礼物总数量:%@", dataDict[@"num"]];
|
|
}
|
|
|
|
- (IBAction)closeButtonClick:(UIButton *)sender {
|
|
[self removeFromSuperview];
|
|
}
|
|
|
|
|
|
@end
|