PwFindViewController.m 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. //
  2. // PwFindViewController.m
  3. // OneCable
  4. //
  5. // Created by nComz on 2017. 3. 31..
  6. // Copyright © 2017년 ntels. All rights reserved.
  7. //
  8. #import "PwFindViewController.h"
  9. #import "CustomButton.h"
  10. #import "CustomLabel.h"
  11. #import "CustomTextField.h"
  12. #import "PwAnswerViewController.h"
  13. @interface PwFindViewController ()
  14. @end
  15. @implementation PwFindViewController
  16. - (void)viewDidLoad {
  17. [super viewDidLoad];
  18. [self initUI];
  19. }
  20. - (void)didReceiveMemoryWarning {
  21. [super didReceiveMemoryWarning];
  22. }
  23. - (void)initUI {
  24. [self.navigationController.navigationBar setHidden:YES];
  25. self.navigationController.interactivePopGestureRecognizer.enabled = NO;
  26. [_lblStep setColor:kUITextColor03 text:[NSString stringWithFormat:@"%@", @"/ 3"]];
  27. _btnNext.enabled = NO ;
  28. }
  29. - (IBAction)btnCancelTouched:(id)sender {
  30. [self dismissViewControllerAnimated:YES completion:nil];
  31. }
  32. - (IBAction)btnNextTouched:(id)sender {
  33. PwAnswerViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"PwAnswerViewController" storyboardName:@"SignUp"];
  34. vc.memberId = _txtFindIdInput.text.trim;
  35. vc.phoneNumber = _txtNumInput.text.trim;
  36. [self.navigationController pushViewController:vc animated:YES];
  37. }
  38. #pragma mark - textfield delegate
  39. - (BOOL)textFieldShouldReturn:(UITextField *)textField {
  40. if ([textField isEqual:_txtFindIdInput]) {
  41. [_txtNumInput becomeFirstResponder] ;
  42. }
  43. else {
  44. [textField resignFirstResponder] ;
  45. }
  46. return YES ;
  47. }
  48. - (void)textFieldDidEndEditing:(UITextField *)textField {
  49. _btnNext.enabled = _txtFindIdInput.text.length >= 6 && _txtNumInput.text.length >= 10 ;
  50. }
  51. @end