I was wondering how to detect if the UITableView
is scrolled (up or down). I want to hide the keyboard when the UITableView
is scrolled with self.view.endEditing(true)
.
Thanks in advance
You can set property of UITable view (XCode 7+)
In Storyboard:
in Code:
tableView.keyboardDismissMode = .onDrag
You can add UIScrollViewDelegate
. After that you can implement scrollViewDidScroll
method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With