// // JXFeedShowView.m // shiku_im // // Created by 123 on 2020/5/26. // Copyright © 2020 Reese. All rights reserved. // #import "JXShareAnQuanView.h" @interface JXShareAnQuanView() @property (weak, nonatomic) IBOutlet UIView *backView; @property (weak, nonatomic) IBOutlet UIView *whiteView; @end @implementation JXShareAnQuanView +(instancetype)XIBJXShareShowView{ return [[NSBundle mainBundle]loadNibNamed:@"JXShareAnQuanView" owner:self options:nil].firstObject; } -(void)awakeFromNib{ [super awakeFromNib]; self.konwBtn.layer.cornerRadius=12; self.konwBtn.layer.masksToBounds=YES; self.whiteView.layer.cornerRadius=12; self.whiteView.layer.masksToBounds=YES; self.backView.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.6]; self.yaoqinTF.layer.cornerRadius=15; self.yaoqinTF.layer.masksToBounds=YES; self.yaoqinTF.layer.borderColor=[UIColor grayColor].CGColor; self.yaoqinTF.layer.borderWidth=1; UIView *leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 12, 30)]; UIImageView *imageV=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 22, 30)]; [leftView addSubview:imageV]; self.yaoqinTF.leftViewMode = UITextFieldViewModeAlways; self.yaoqinTF.leftView=leftView; [self.backView addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(closeView)]]; } -(void)showView{ JXShareAnQuanView *show=[JXShareAnQuanView XIBJXShareShowView]; show.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.6]; show.userInteractionEnabled=YES; show.frame=[UIScreen mainScreen].bounds; [[UIApplication sharedApplication].keyWindow addSubview:show]; } - (void)closeView{ [self setHidden:YES]; } -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ [self endEditing:YES]; } @end