123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- //
- // 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
|