diff --git a/Signal/src/ViewControllers/Registration/RegistrationVerificationCodeView.swift b/Signal/src/ViewControllers/Registration/RegistrationVerificationCodeView.swift index f1fe99152d..aff3824621 100644 --- a/Signal/src/ViewControllers/Registration/RegistrationVerificationCodeView.swift +++ b/Signal/src/ViewControllers/Registration/RegistrationVerificationCodeView.swift @@ -140,6 +140,8 @@ class RegistrationVerificationCodeView: UIView { self.addSubview(textfield) updateColors() + + addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(didTapView))) } public func updateColors() { @@ -202,6 +204,11 @@ class RegistrationVerificationCodeView: UIView { textfield.selectedTextRange = textfield.textRange(from: newPosition, to: newPosition) } + @objc + private func didTapView() { + becomeFirstResponder() + } + @discardableResult public override func becomeFirstResponder() -> Bool { return textfield.becomeFirstResponder() diff --git a/Signal/src/ViewControllers/Registration/RegistrationVerificationViewController.swift b/Signal/src/ViewControllers/Registration/RegistrationVerificationViewController.swift index 2b96e6e7b3..b73b3e1429 100644 --- a/Signal/src/ViewControllers/Registration/RegistrationVerificationViewController.swift +++ b/Signal/src/ViewControllers/Registration/RegistrationVerificationViewController.swift @@ -214,11 +214,7 @@ class RegistrationVerificationViewController: OWSViewController { public override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - if !UIDevice.current.isIPhone5OrShorter { - // Small devices may obscure parts of the UI behind the keyboard, especially with larger - // font sizes. - verificationCodeView.becomeFirstResponder() - } + verificationCodeView.becomeFirstResponder() showValidationErrorUiIfNecessary()