| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- //
- // MOFirstRechargeRulesView.m
- // MiMoLive
- //
- // Created by SuperC on 2024/9/9.
- //
- #import "MOFirstRechargeRulesView.h"
- @interface MOFirstRechargeRulesView ()
- @property (weak, nonatomic) IBOutlet UIView *bgView;
- @property (weak, nonatomic) IBOutlet UILabel *titleLab;
- @property (weak, nonatomic) IBOutlet UITextView *contentTex;
- @end
- @implementation MOFirstRechargeRulesView
- + (instancetype)moFirstRechargeRulesView{
- return [[[NSBundle mainBundle] loadNibNamed:@"MOFirstRechargeRulesView" owner:self options:nil] firstObject];
- }
- - (void)awakeFromNib{
- [super awakeFromNib];
-
- self.bgView.layer.cornerRadius = 16.0;
- self.bgView.layer.masksToBounds = YES;
-
- self.titleLab.font = [MOTextTools getTheFontWithSize:20.0 AndFontName:kNormalTitleFontStr];
- self.contentTex.font = [MOTextTools getTheFontWithSize:12.0 AndFontName:kNormalContentFontStr];
-
- self.contentTex.text = NSLocalString(@"mimo_first_recharge_rule_content");
- self.contentTex.editable = NO;
- }
- - (IBAction)closeBtnClick:(id)sender {
- [self dismissFirstRechargeRulesView];
- }
- - (void)setRuleContentStr:(NSString *)ruleContentStr{
- _ruleContentStr = ruleContentStr;
-
- self.contentTex.text = ruleContentStr;
- }
- - (void)showFirstRechargeRulesView//界面显示动画
- {
-
- UIWindow *keyWindow = [[UIApplication sharedApplication] delegate].window;
- [keyWindow addSubview:self];
- self.frame = CGRectMake(0.0, 0.0, SCREENWIDTH, SCREENHEIGHT);
-
- //动画效果
- self.bgView.transform = CGAffineTransformMakeScale(1.3, 1.3);
- self.bgView.alpha = 0;
- [UIView animateWithDuration:0.2 animations:^
- {
- self.bgView.transform = CGAffineTransformMakeScale(1.0, 1.0);
- self.bgView.alpha = 1;
- } completion:^(BOOL finished)
- {
- }];
- }
- - (void)dismissFirstRechargeRulesView
- {
- [UIView animateWithDuration:0.2 animations:^
- {
- self.bgView.transform = CGAffineTransformMakeScale(1.3, 1.3);
- self.bgView.alpha = 0;
- } completion:^(BOOL finished)
- {
- if (finished)
- {
- [self removeFromSuperview];
- }
- }];
- }
- @end
|