// // JXShowDayFulLiVc.m // shiku_im // // Created by 123 on 2020/5/20. // Copyright © 2020 Reese. All rights reserved. // #import "JXShowDayFulLiVc.h" @interface JXShowDayFulLiVc() @property (nonatomic,weak) JXShowDayFulLiVc *show; @end @implementation JXShowDayFulLiVc -(instancetype)initWithFrame:(CGRect)frame{ if (self=[super initWithFrame:frame]) { UIView *backView=[[UIView alloc]init]; backView.userInteractionEnabled=YES; backView.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.1]; [self addSubview:backView]; [backView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(0); make.left.and.right.mas_equalTo(0); make.bottom.mas_equalTo(0); }]; UIImageView *whiteShowView=[[UIImageView alloc]init]; whiteShowView.userInteractionEnabled=YES; whiteShowView.image=[UIImage imageNamed:@"beijing"]; whiteShowView.contentMode=UIViewContentModeScaleToFill; [backView addSubview:whiteShowView]; [whiteShowView mas_makeConstraints:^(MASConstraintMaker *make) { make.width.mas_equalTo(JX_SCREEN_WIDTH-90); make.height.mas_equalTo(JX_SCREEN_WIDTH-90); make.centerX.mas_equalTo(backView.mas_centerX); make.centerY.mas_equalTo(backView.mas_centerY); }]; //恭喜获得 UIImageView *titleL=[[UIImageView alloc]init]; titleL.userInteractionEnabled=YES; titleL.image=[UIImage imageNamed:@"gongxihuode"]; [whiteShowView addSubview:titleL]; [titleL mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.mas_equalTo(backView.mas_centerX); make.top.mas_equalTo(55); make.width.mas_equalTo(128); make.height.mas_equalTo(31); }]; UIButton *coinJXBtn=[[UIButton alloc]init]; coinJXBtn.titleLabel.font=[UIFont systemFontOfSize:20 weight:UIFontWeightMedium]; [coinJXBtn setTitleColor:[UIColor colorWithRed:158/255.0 green:108/255.0 blue:71/255.0 alpha:1.0] forState:UIControlStateNormal];; [coinJXBtn setTitle:@"20即信币" forState:UIControlStateNormal]; [coinJXBtn setBackgroundImage:[UIImage imageNamed:@"zhongj"] forState:UIControlStateNormal]; [whiteShowView addSubview:coinJXBtn]; self.coinBtn=coinJXBtn; [coinJXBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(titleL.mas_bottom).mas_offset(20); make.centerX.mas_equalTo(titleL.mas_centerX); }]; UILabel *tipLael=[[UILabel alloc]init]; tipLael.font=[UIFont systemFontOfSize:15 weight:UIFontWeightMedium]; tipLael.text=@"可在“我-即信钱包”中查看奖励"; tipLael.textColor=[UIColor colorWithRed:158/255.0 green:108/255.0 blue:71/255.0 alpha:1.0]; tipLael.textAlignment=NSTextAlignmentCenter; [whiteShowView addSubview:tipLael]; [tipLael mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(coinJXBtn.mas_bottom).mas_offset(20); make.centerX.mas_equalTo(whiteShowView.mas_centerX); }]; UIButton *tongYiBtn=[[UIButton alloc]init]; tongYiBtn.titleLabel.font=[UIFont systemFontOfSize:15 weight:UIFontWeightMedium]; [tongYiBtn setTitle:@"分享到群聊并领取奖励" forState:UIControlStateNormal]; [tongYiBtn setTitleColor:[UIColor colorWithRed:158/255.0 green:108/255.0 blue:71/255.0 alpha:1.0] forState:UIControlStateNormal];; [tongYiBtn setBackgroundImage:[UIImage imageNamed:@"xiawu"] forState:UIControlStateNormal]; tongYiBtn.layer.cornerRadius=6; tongYiBtn.layer.masksToBounds=YES; tongYiBtn.contentMode=UIViewContentModeScaleAspectFill; [whiteShowView addSubview:tongYiBtn]; self.tongYiBtn=tongYiBtn; [tongYiBtn addTarget:self action:@selector(tongyiBtn:) forControlEvents:UIControlEventTouchUpInside]; [tongYiBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(tipLael.mas_bottom).mas_offset(22); make.centerX.mas_equalTo(tipLael.mas_centerX); make.height.mas_equalTo(44); }]; // [self thirdBtnAction]; } return self; } +(void)showView{ JXShowDayFulLiVc *show=[[JXShowDayFulLiVc alloc]init]; show.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.7]; show.frame=[UIScreen mainScreen].bounds; [[UIApplication sharedApplication].keyWindow addSubview:show]; } -(void)showView{ JXShowDayFulLiVc *show=[[JXShowDayFulLiVc alloc]init]; show.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.7]; show.frame=[UIScreen mainScreen].bounds; [[UIApplication sharedApplication].keyWindow addSubview:show]; } +(void)closeView{ } -(void)dissmisView{ [self removeFromSuperview]; } - (void)tongyiBtn:(UIButton *)sender{ [self removeFromSuperview]; } @end