123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- //
- // APPassForgetEmailV.m
- // westkissMob
- //
- // Created by iOS on 2024/4/24.
- //
- #import "APPassForgetEmailV.h"
- #import "KWTextField.h"
- @interface APPassForgetEmailV ()
- @property (nonatomic, strong) KWTextField *codeTf;
- @property (nonatomic, strong) UIButton *xxx_sureBtn;
- @end
- @implementation APPassForgetEmailV
- - (instancetype)initWithFrame:(CGRect)frame
- {
- self = [super initWithFrame:frame];
- if (self) {
- [self loadSubV];
- }
- return self;
- }
- - (void)action_submitClick:(UIButton *)bt {
- [bt sleep:1];
- NSString *code = self.codeTf.text;
- if (code == nil || code.isEmpty) {
- [self makeToast:@"The Email Can't Be Empty"];
- return;
- }
- if (self.btnClick) {
- self.btnClick(code);
- }
- }
- - (void)loadSubV {
- UILabel *titileLab = [UILabel new];
- titileLab.text = @"RESET PASSWORD";
- titileLab.font = [UIFont boldSystemFontOfSize:16];
- titileLab.textAlignment = NSTextAlignmentCenter;
- titileLab.textColor = [UIColor colorWithHexString:@"#000000"];
- [self addSubview:titileLab];
-
- UILabel *detailLab = [UILabel baseLb];
- detailLab.text = @"Enter Your Email Address And We Will Send You A Verification Code To Reset Your Password.";
- detailLab.textAlignment = NSTextAlignmentCenter;
- detailLab.numberOfLines = 0;
- detailLab.font = [UIFont fontWithName:Rob_Regular size:14];
- [self addSubview:detailLab];
-
- [self addSubview:self.codeTf];
-
- [self addSubview:self.xxx_sureBtn];
- [self bringSubviewToFront:self.codeTf];
-
- [titileLab mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.equalTo(@40);
- make.leading.equalTo(self).offset(30);
- make.trailing.equalTo(self).offset(-30);
- }];
-
- [detailLab mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.equalTo(titileLab.mas_bottom).offset(40);
- make.leading.equalTo(self).offset(30);
- make.trailing.equalTo(self).offset(-30);
- }];
-
- [self.codeTf mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.equalTo(detailLab.mas_bottom).offset(40);
- make.trailing.equalTo(self).offset(-20);
- make.leading.equalTo(self).offset(20);
- make.height.equalTo(@45);
- }];
- [self.xxx_sureBtn mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.equalTo(self.codeTf.mas_bottom).offset(30);
- make.leading.equalTo(@20);
- make.trailing.equalTo(self).offset(-20);
- make.height.equalTo(@45);
- make.bottom.equalTo(self).offset(-30);
- }];
-
- }
- - (KWTextField *)codeTf {
- if (!_codeTf) {
- KWTextField *tf = [[KWTextField alloc] init];
- tf.placeholder = @"Enter The Email";
- _codeTf = tf;
- }
- return _codeTf;
- }
- -(UIButton *)xxx_sureBtn{
- if (!_xxx_sureBtn) {
- _xxx_sureBtn = [TT_ControlTool FTT_ControlToolUIButtonFrame:CGRectMake(0,0 ,SCREEN_WIDTH-40,50)
- taeget:self
- sel:@selector(action_submitClick:)
- tag:0
- AntTitle:@"SUBMIT"
- titleFont:17
- titleColor:[UIColor whiteColor]
- andImage:nil
- AndBackColor:nil
- adjustsFontSizesTowidth:NO
- masksToBounds:YES
- conrenRadius:5
- BorderColor:nil
- BorderWidth:0
- ContentHorizontalAligment:0];
- _xxx_sureBtn.backgroundColor = [UIColor blackColor];
- }
- return _xxx_sureBtn;
- }
- @end
|