forgetPwdViewController.m 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. //
  2. // forgetPwdViewController.m
  3. //
  4. //
  5. // Created David on 2023/11/6.
  6. //
  7. #import "forgetPwdViewController.h"
  8. #import "AuthCodeInputView.h"
  9. #import "SetPWDFirstViewController.h"
  10. #import "forgetSecretKeyViewController.h"
  11. @interface forgetPwdViewController ()
  12. @end
  13. @implementation forgetPwdViewController
  14. - (void)viewDidLoad {
  15. [super viewDidLoad];
  16. // Do any additional setup after loading the view.
  17. [self.toolBar setHidden:YES];
  18. [self.navigationBar setHidden:YES];
  19. [self.navBarBGView setHidden:NO];
  20. // NSString *curTitle = NSLocalizedString(@"input_pwd_forget_secret_key",nil);
  21. // UIButton *rightBut = [[UIButton alloc] init];
  22. // //rightBut.backgroundColor = [UIColor redColor];
  23. // [rightBut setTitle:curTitle forState:UIControlStateNormal];
  24. // rightBut.titleLabel.font = [UIFont systemFontOfSize:16.0];
  25. // [rightBut setTitleColor:[UIColor hwColor:@"#13B2EB" alpha:1.0] forState:UIControlStateNormal];
  26. // [rightBut addTarget:self action:@selector(rightBtnPressed) forControlEvents:UIControlEventTouchUpInside];
  27. // [self.navBarBGView addSubview:rightBut];
  28. //
  29. // rightBut.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
  30. //
  31. // [rightBut mas_makeConstraints:^(MASConstraintMaker *make) {
  32. // make.centerY.equalTo(self.backBtn.mas_centerY);
  33. // make.width.mas_equalTo(250);
  34. // make.right.mas_equalTo(-20);
  35. // make.height.mas_equalTo(30);
  36. // }];
  37. [self initBaseUIfun];
  38. }
  39. #pragma mark 点击返回
  40. - (void)backBtnPressed{
  41. if(_isCheckPwdType){
  42. [self.navigationController popViewControllerAnimated:YES];
  43. return;
  44. }
  45. //发个通知 记录进入了设置密码
  46. [[NSNotificationCenter defaultCenter] postNotificationName:forgetPwdBackNotification object:nil];
  47. }
  48. #pragma mark 点击右导航线
  49. - (void)rightBtnPressed{
  50. forgetSecretKeyViewController *vc = [forgetSecretKeyViewController new];
  51. [self.navigationController pushViewController:vc animated:YES];
  52. }
  53. #pragma mark UI
  54. - (void)initBaseUIfun
  55. {
  56. self.view.backgroundColor = HWF5F7FAColor;
  57. AuthCodeInputView *view = [[AuthCodeInputView alloc] init];
  58. [self.view addSubview:view];
  59. [view mas_makeConstraints:^(MASConstraintMaker *make) {
  60. make.left.mas_equalTo(0);
  61. make.top.mas_equalTo(self.navBarBGView.mas_bottom).offset(0);
  62. make.right.mas_equalTo(0);
  63. make.bottom.mas_equalTo(0);
  64. }];
  65. KWeakSelf
  66. view.authSuccess = ^(BOOL success) {
  67. if(success){
  68. [weakSelf gotoSetPwdVCFun];
  69. }
  70. };
  71. }
  72. #pragma mark 跳转设置密码界面
  73. - (void)gotoSetPwdVCFun
  74. {
  75. /*设置密码*/
  76. SetPWDFirstViewController *nextVC = [[SetPWDFirstViewController alloc] init];
  77. nextVC.isForgetPwdType = YES;
  78. [self.navigationController pushViewController:nextVC animated:YES];
  79. }
  80. @end