Hide keyboard when scroll UITableView

前端 未结 8 2251
借酒劲吻你
借酒劲吻你 2020-12-02 05:47

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

8条回答
  •  星月不相逢
    2020-12-02 06:07

    Just to add an update to the answers above. The below worked for me in Swift 1.2

    tableView.keyboardDismissMode = UIScrollViewKeyboardDismissMode.OnDrag
    

    or

    tableView.keyboardDismissMode = UIScrollViewKeyboardDismissMode.Interactive
    

提交回复
热议问题