APPassForgetEmailV.m 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. //
  2. // APPassForgetEmailV.m
  3. // westkissMob
  4. //
  5. // Created by iOS on 2024/4/24.
  6. //
  7. #import "APPassForgetEmailV.h"
  8. #import "KWTextField.h"
  9. @interface APPassForgetEmailV ()
  10. @property (nonatomic, strong) KWTextField *codeTf;
  11. @property (nonatomic, strong) UIButton *xxx_sureBtn;
  12. @end
  13. @implementation APPassForgetEmailV
  14. - (instancetype)initWithFrame:(CGRect)frame
  15. {
  16. self = [super initWithFrame:frame];
  17. if (self) {
  18. [self loadSubV];
  19. }
  20. return self;
  21. }
  22. - (void)action_submitClick:(UIButton *)bt {
  23. [bt sleep:1];
  24. NSString *code = self.codeTf.text;
  25. if (code == nil || code.isEmpty) {
  26. [self makeToast:@"The Email Can't Be Empty"];
  27. return;
  28. }
  29. if (self.btnClick) {
  30. self.btnClick(code);
  31. }
  32. }
  33. - (void)loadSubV {
  34. UILabel *titileLab = [UILabel new];
  35. titileLab.text = @"RESET PASSWORD";
  36. titileLab.font = [UIFont boldSystemFontOfSize:16];
  37. titileLab.textAlignment = NSTextAlignmentCenter;
  38. titileLab.textColor = [UIColor colorWithHexString:@"#000000"];
  39. [self addSubview:titileLab];
  40. UILabel *detailLab = [UILabel baseLb];
  41. detailLab.text = @"Enter Your Email Address And We Will Send You A Verification Code To Reset Your Password.";
  42. detailLab.textAlignment = NSTextAlignmentCenter;
  43. detailLab.numberOfLines = 0;
  44. detailLab.font = [UIFont fontWithName:Rob_Regular size:14];
  45. [self addSubview:detailLab];
  46. [self addSubview:self.codeTf];
  47. [self addSubview:self.xxx_sureBtn];
  48. [self bringSubviewToFront:self.codeTf];
  49. [titileLab mas_makeConstraints:^(MASConstraintMaker *make) {
  50. make.top.equalTo(@40);
  51. make.leading.equalTo(self).offset(30);
  52. make.trailing.equalTo(self).offset(-30);
  53. }];
  54. [detailLab mas_makeConstraints:^(MASConstraintMaker *make) {
  55. make.top.equalTo(titileLab.mas_bottom).offset(40);
  56. make.leading.equalTo(self).offset(30);
  57. make.trailing.equalTo(self).offset(-30);
  58. }];
  59. [self.codeTf mas_makeConstraints:^(MASConstraintMaker *make) {
  60. make.top.equalTo(detailLab.mas_bottom).offset(40);
  61. make.trailing.equalTo(self).offset(-20);
  62. make.leading.equalTo(self).offset(20);
  63. make.height.equalTo(@45);
  64. }];
  65. [self.xxx_sureBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  66. make.top.equalTo(self.codeTf.mas_bottom).offset(30);
  67. make.leading.equalTo(@20);
  68. make.trailing.equalTo(self).offset(-20);
  69. make.height.equalTo(@45);
  70. make.bottom.equalTo(self).offset(-30);
  71. }];
  72. }
  73. - (KWTextField *)codeTf {
  74. if (!_codeTf) {
  75. KWTextField *tf = [[KWTextField alloc] init];
  76. tf.placeholder = @"Enter The Email";
  77. _codeTf = tf;
  78. }
  79. return _codeTf;
  80. }
  81. -(UIButton *)xxx_sureBtn{
  82. if (!_xxx_sureBtn) {
  83. _xxx_sureBtn = [TT_ControlTool FTT_ControlToolUIButtonFrame:CGRectMake(0,0 ,SCREEN_WIDTH-40,50)
  84. taeget:self
  85. sel:@selector(action_submitClick:)
  86. tag:0
  87. AntTitle:@"SUBMIT"
  88. titleFont:17
  89. titleColor:[UIColor whiteColor]
  90. andImage:nil
  91. AndBackColor:nil
  92. adjustsFontSizesTowidth:NO
  93. masksToBounds:YES
  94. conrenRadius:5
  95. BorderColor:nil
  96. BorderWidth:0
  97. ContentHorizontalAligment:0];
  98. _xxx_sureBtn.backgroundColor = [UIColor blackColor];
  99. }
  100. return _xxx_sureBtn;
  101. }
  102. @end