1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- //
- // JXMoneyShareView.m
- // shiku_im
- //
- // Created by 123 on 2020/6/22.
- // Copyright © 2020 Reese. All rights reserved.
- //
- #import "JXMoneyShareView.h"
-
- @interface JXMoneyShareView()<UITextViewDelegate>
- @property (nonatomic,weak)UILabel *timeStr;
- @property (nonatomic,weak) JXMoneyShareView *show;
- @end
- @implementation JXMoneyShareView
-
- -(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);
- }];
-
- //fenshaTitle_jinguanjia fenshaTitle
- 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(-47);
- make.centerX.mas_equalTo(whiteShowView.mas_centerX);
- }];
-
-
- 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(-3);
- make.centerX.mas_equalTo(whiteShowView.mas_centerX);
- }];
-
-
- }
-
- return self;
- }
-
- +(void)showView{
- JXMoneyShareView *show=[[JXMoneyShareView 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:@"comeBack" object:nil];
- [self removeFromSuperview];
- }
- @end
|