Files
featherVoice/QXLive/Mine(音域)/View/QXBodyPriceRuleView.m

46 lines
1.4 KiB
Mathematica
Raw Normal View History

2025-11-28 22:43:06 +08:00
//
// QXBodyPriceRuleView.m
// QXLive
//
// Created by on 2025/11/25.
//
#import "QXBodyPriceRuleView.h"
@implementation QXBodyPriceRuleView
2025-12-04 14:11:00 +08:00
+(void)showInView:(UIView *)view currentBodyValue:(NSString *)currentBodyValue coin:(NSString *)coin bodyValue:(NSString *)bodyValue{
2025-11-28 22:43:06 +08:00
UINib *nib = [UINib nibWithNibName:@"QXBodyPriceRuleView" bundle:[NSBundle mainBundle]];
QXBodyPriceRuleView *ruleView = [nib instantiateWithOwner:nil options:nil].firstObject;
ruleView.frame = UIScreen.mainScreen.bounds;
ruleView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
ruleView.bgView.alpha = 0;
2025-12-04 14:11:00 +08:00
ruleView.currentPriceLabel.text = currentBodyValue;
ruleView.bodyPriceLabel.text = [NSString stringWithFormat:@"收礼身价,等于通过累计收礼的价值,每%@个金币等于%@身价",coin,bodyValue];
2025-11-28 22:43:06 +08:00
[view addSubview:ruleView];
[UIView animateWithDuration:0.2 animations:^{
ruleView.bgView.alpha = 1;
}completion:^(BOOL finished) {
}];
}
2025-12-04 14:11:00 +08:00
2025-11-28 22:43:06 +08:00
- (IBAction)closeAction:(id)sender {
[UIView animateWithDuration:0.2 animations:^{
self.bgView.alpha = 0;
}completion:^(BOOL finished) {
[self removeFromSuperview];
}];
}
- (IBAction)commitAction:(id)sender {
[UIView animateWithDuration:0.3 animations:^{
self.bgView.alpha = 0;
}completion:^(BOOL finished) {
[self removeFromSuperview];
}];
}
@end