UITableView reloadData automatically calls resignFirstResponder

后端 未结 13 1428
天命终不由人
天命终不由人 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 22:57

    This reads like expected behavior - the picker belongs to a particular cell, that cell gets reloaded and is not the first responder any more. I guess one had to select a specific element anyway for the picker to appear, i.e. to make it first responder.

    So you either need to make it become first responder again after reloading, or update the specific cell directly.

提交回复
热议问题