TableView doesn't scroll in iOS11

I use text fields inside a table view. On the next keyboard key, focus will move to the next text field, and this works fine on iOS 10. but on iOS 11, the table does not scroll. After scrolling, help me scroll through the table view.

Below the tableview scroll method on which the text field is selected, write this code in the delegate method of the text field.

func textFieldDidEndEditing(textField: UITextField) { // calculate the nsindexpath based on the textfield which is selected tableView.scrollToRow(at: IndexPath(row: textField.tag + 1, section: 0), at: UITableViewScrollPosition.top, animated: true) } 
+5
source share

Source: https://habr.com/ru/post/1272224/


All Articles