In my app i want hide keyboard when i start scrolling UITableView. I search about this in internet, and most answer is subclassing UITableView (http://stackoverflow.com/ques
With Swift 5
To hide the keyboard when scrolling the TableView and stop editing properly, we still need to combine two types of answers:
ViewDidLoad() code (as Pei explained) for instance:tableView.keyboardDismissMode = .onDrag
UITableViewController class override func scrollViewDidScroll(_ scrollView: UIScrollView) {
if !tableView.isDecelerating {
view.endEditing(true)
}
}