123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- //
- // JXMoneyShareView.m
- // shiku_im
- //
- // Created by 123 on 2020/6/22.
- // Copyright © 2020 Reese. All rights reserved.
- //
- #import "JXGoldShareView.h"
-
- @interface JXGoldShareView()<UITextViewDelegate>
- @property (nonatomic,weak)UILabel *timeStr;
- @property (nonatomic,weak) JXGoldShareView *show;
- @end
- @implementation JXGoldShareView
-
- -(instancetype)initWithFrame:(CGRect)frame{
-
- if (self=[super initWithFrame:frame]) {
-
- UIView *backView=[[UIView alloc]init];
- backView.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.3];
- [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.image=[UIImage imageNamed:@"zyjMoneyB"];
- whiteShowView.userInteractionEnabled=YES;
- [backView addSubview:whiteShowView];
- [whiteShowView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerX.mas_equalTo(backView.mas_centerX);
- make.centerY.mas_equalTo(backView.mas_centerY);
- //make.left.mas_equalTo(20);
- //make.right.mas_equalTo(-20);
- }];
-
-
- UIButton *tongYiBtn=[[UIButton alloc]init];
- tongYiBtn.titleLabel.font=[UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
- [tongYiBtn setImage:[UIImage imageNamed:@"zyjShare"] forState:UIControlStateNormal];
- tongYiBtn.layer.cornerRadius=6;
- tongYiBtn.layer.masksToBounds=YES;
- [whiteShowView addSubview:tongYiBtn];
- [tongYiBtn addTarget:self action:@selector(tongyiBtn:) forControlEvents:UIControlEventTouchUpInside];
- [tongYiBtn mas_makeConstraints:^(MASConstraintMaker *make) {
- make.bottom.mas_equalTo(-10);
- make.centerX.mas_equalTo(whiteShowView.mas_centerX);
- }];
-
-
- UIImageView *titleIMG=[[UIImageView alloc]init];
- titleIMG.image=[UIImage imageNamed:@"fenshaTitle_jinguanjia"];
- titleIMG.userInteractionEnabled=YES;
- [whiteShowView addSubview:titleIMG];
- [titleIMG mas_makeConstraints:^(MASConstraintMaker *make) {
- //make.top.mas_equalTo(whiteShowView.mas_top).mas_offset(15);
- make.bottom.mas_equalTo(tongYiBtn.mas_top).offset(-5);
- make.centerX.mas_equalTo(whiteShowView.mas_centerX);
- }];
-
- }
-
- return self;
- }
-
- +(void)showView{
- JXGoldShareView *show=[[JXGoldShareView alloc]init];
- show.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.7];
- show.frame=[UIScreen mainScreen].bounds;
- [[UIApplication sharedApplication].keyWindow addSubview:show];
-
-
- }
-
- -(void)dissmisView{
-
- [self removeFromSuperview];
-
- }
- - (void)tongyiBtn:(UIButton *)sender{
-
- [g_notify postNotificationName:@"goldShare" object:nil];
- [self removeFromSuperview];
- }
- @end
|