UITableView reloadData automatically calls resignFirstResponder

后端 未结 13 1427
天命终不由人
天命终不由人 2020-12-02 22:44

I have this UITableView with custom cells that can get only predefined values, therefore I use a UIPickerView as their inputView. All is jolly good until I edit a field and

13条回答
  •  佛祖请我去吃肉
    2020-12-02 23:15

    If you are facing this issue with a search bar, the following did it for me in iOS 6:

    • Instantiate a UISearchBar and add it as a subview to your UITableView at the top.
    • Create a dummy first cell in your UITableView so that the search bar only blocks this dummy cell and not your actual cell with data.

提交回复
热议问题