// // JXselectSexView.m // shiku_im // // Created by 123 on 2020/6/8. // Copyright © 2020 Reese. All rights reserved. // #import "JXselectSexView.h" @interface JXselectSexView() @property (nonatomic,weak) UIButton *tongYiBtn; @property (nonatomic,weak) JXselectSexView *show; @property (nonatomic,weak) UIButton *selectBtn; @end @implementation JXselectSexView -(instancetype)initWithFrame:(CGRect)frame{ if (self=[super initWithFrame:frame]) { self.userInteractionEnabled=YES; UIView *backView=[[UIView alloc]init]; backView.backgroundColor=[UIColor colorWithWhite:0.0 alpha:0.3]; backView.userInteractionEnabled=YES; [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); }]; [backView addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(closeBtn)]]; UIView *whiteShowView=[[UIView alloc]init]; whiteShowView.backgroundColor=[UIColor colorWithWhite:1.0 alpha:1.0]; whiteShowView.layer.cornerRadius=15; whiteShowView.userInteractionEnabled=YES; whiteShowView.layer.masksToBounds=YES; [backView addSubview:whiteShowView]; whiteShowView.frame=CGRectMake(20, (JX_SCREEN_HEIGHT-200)/2, JX_SCREEN_WIDTH-40, 200); UILabel *titleL=[[UILabel alloc]init]; titleL.font=[UIFont systemFontOfSize:20 weight:UIFontWeightMedium]; titleL.text=@"选择性别"; [whiteShowView addSubview:titleL]; titleL.frame=CGRectMake(20, 15, JX_SCREEN_WIDTH-40, 16); NSArray *titleS=@[@"男",@"女"]; for (int i=0; i