I have a very simple table and when tocuh a cell it opens a new view with one UITextfield. All I want is that the keyboard will automatically opens, without the user have to tou
Prefer adding the first responder on the main thread -
override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) DispatchQueue.main.async { self.textField.becomeFirstResponder() } }
This will come in handy when view controller view is added as a subview.