I am using UITextField\'s method becomeFirstResponder to show the keyboard. This is working in iOS 7. But in iOS 8 this method doesn\'t show the keyboard.
U
Swift 4 and iOS 11
In my case, no mater what I tried, I was not able to set first responder until I tried this.
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
if cell.isKind(of: YOURTABLEVIEWCELL.self) {
if let yourCell = cell as? YOURTABLEVIEWCELL{
yourCell.yourUiTextField.becomeFirstResponder()
}
}
}
Hope this helps someone stuck with the same problem.