Skip to content

Commit

Permalink
- Made the textfield resign as first responder in all the cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablo Carrascal committed Aug 14, 2018
1 parent d95d5fd commit 4bd0832
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ownCloud/Client/Actions/NamingViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ class NamingViewController: UIViewController {
@objc private func doneButtonPressed() {

if let item = item, self.nameTextField.text == item.name {
nameTextField.resignFirstResponder()
self.dismiss(animated: true) {
self.completion(nil, self)
}
Expand All @@ -293,6 +294,7 @@ class NamingViewController: UIViewController {

let validatorResult = stringValidator(nameTextField.text!)
if validatorResult.0 {
nameTextField.resignFirstResponder()
self.dismiss(animated: true) {
self.completion(self.nameTextField.text!, self)
}
Expand All @@ -303,6 +305,7 @@ class NamingViewController: UIViewController {
self.present(controller, animated: true)
}
} else {
nameTextField.resignFirstResponder()
self.dismiss(animated: true) {
self.completion(self.nameTextField.text!, self)
}
Expand Down

0 comments on commit 4bd0832

Please sign in to comment.