| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- //
- // MOChatLimitView.m
- // MiMoLive
- //
- // Created by SuperC on 2024/9/23.
- //
- #import "MOChatLimitView.h"
- #import "MOFirstRechargeRulesView.h"
- #import "MOTopUpVC.h"
- @interface MOChatLimitView ()
- @property (weak, nonatomic) IBOutlet UIImageView *topImgView;
- @property (weak, nonatomic) IBOutlet UIButton *topUpBtn;
- @property (weak, nonatomic) IBOutlet UILabel *topTipLab;
- @property (weak, nonatomic) IBOutlet UILabel *bottomTipLab;
- @end
- @implementation MOChatLimitView
- + (instancetype)moChatLimitView{
- return [[[NSBundle mainBundle] loadNibNamed:@"MOChatLimitView" owner:self options:nil] firstObject];
- }
- - (void)awakeFromNib{
- [super awakeFromNib];
-
- self.layer.cornerRadius = 16.0;
- self.layer.masksToBounds = YES;
-
- NSArray *colorArr = @[[MOTools colorWithHexString:@"#A5F3FF" alpha:1.0],[MOTools colorWithHexString:@"#EAB8FF" alpha:1.0]];
- UIImage *image = [MOTools createGradientRectImageWithBounds:CGRectMake(0, 0, (SCREENWIDTH - 22.0 * 2), 152.0) Colors:colorArr GradientType:0];
- [self.topImgView setImage:image];
-
- self.topUpBtn.layer.cornerRadius = 46.0 / 2.0;
- self.topUpBtn.layer.masksToBounds = YES;
-
- MOMeDataInfo *userInfoData = (MOMeDataInfo *)[[MODataCache sharedYYCache] objectForKey:kMineUserInfo];
-
- self.topTipLab.text = [NSString stringWithFormat:@"Sorry, You level %.f you can only send one message",userInfoData.level];
-
- [self.topUpBtn setFont:[MOTextTools getTheFontWithSize:24.0 AndFontName:kNormalTitleFontStr]];
-
- self.topTipLab.font = [MOTextTools getTheFontWithSize:16.0 AndFontName:kNormalContentFontStr];
- self.bottomTipLab.font = [MOTextTools getTheFontWithSize:26.0 AndFontName:kNormalContentFontStr];
- }
- - (IBAction)topUpBtnClick:(id)sender {
- UIViewController *currentVC = [MOTools currentViewController];
- MOTopUpVC *vc = [[MOTopUpVC alloc] init];
- [currentVC.navigationController pushViewController:vc animated:YES];
- }
- - (IBAction)wenBtnClick:(id)sender {
- MOFirstRechargeRulesView *view = [MOFirstRechargeRulesView moFirstRechargeRulesView];
- view.ruleContentStr = NSLocalString(@"mimo_chat_rule");
- [view showFirstRechargeRulesView];
- }
- @end
|