Files
yuyin_ios/SweetParty/主类/音悦新增/炼仙传说/WLStakeResultFailureView.m

76 lines
2.0 KiB
Mathematica
Raw Normal View History

2025-08-08 11:05:33 +08:00
//
// WLStakeResultFailureView.m
// romantic
//
// Created by Xmac on 2024/4/22.
// Copyright © 2024 romantic. All rights reserved.
//
#import "WLStakeResultFailureView.h"
#import "TFPopup.h"
@interface WLStakeResultFailureView ()
@property (nonatomic, strong) TFPopupParam *param;
@property (weak, nonatomic) IBOutlet UIView *blackView;
@end
@implementation WLStakeResultFailureView
- (void)awakeFromNib {
[super awakeFromNib];
WEAK_SELF
[self.blackView dg_Tapped:^{
[weakSelf removeFromSuperview];
}];
}
- (void)remove {
[self tf_remove];
}
- (IBAction)onConfirm:(id)sender {
if (self.onConfirmBlock) {
self.onConfirmBlock();
}
[self tf_remove];
}
- (void)show {
self.frame = [UIScreen mainScreen].bounds;
[MainWindow() addSubview:self];
}
- (void)onPopupWithSize:(CGSize)size model:(WLStakeModel *)model {
// [self tf_remove];
//
// self.frame = CGRectMake(0, 0, size.width, size.height);
//// TFPopupParam *param = [[TFPopupParam alloc] init];
//// [self tf_showNormal:KEYWINDOW popupParam:param];
//
// [self tf_showNormal:KEYWINDOW popupParam:self.param];
[self show];
if ([model.win_type isEqualToString:@"1"]) {
_constellationImageView.image = ImageNamed(@"stake_2_sel");
} else if ([model.win_type isEqualToString:@"2"]) {
_constellationImageView.image = ImageNamed(@"stake_1_sel");
} else if ([model.win_type isEqualToString:@"3"]) {
_constellationImageView.image = ImageNamed(@"stake_4_sel");
} else if ([model.win_type isEqualToString:@"4"]) {
_constellationImageView.image = ImageNamed(@"stake_5_sel");
} else if ([model.win_type isEqualToString:@"5"]) {
_constellationImageView.image = ImageNamed(@"stake_3_sel");
}
_constellationLabel.text = [NSString stringWithFormat:@"炼仙传说:%@", model.type_name];
}
- (TFPopupParam *)param {
if (!_param) {
_param = [[TFPopupParam alloc] init];
}
return _param;
}
@end