var data = [IndexPath: String]()
и UITextFieldDelegate
. А в методе делегата сделай так:func textFieldDidEndEditing(_ textField: UITextField){
let pointInTable = textField.convert(textField.bounds.origin, to: tableView)
guard let textFieldIndexPath = tableView.indexPathForRow(at: pointInTable) else { return }
guard let text = textField.text else { return }
data[textFieldIndexPath] = data[textFieldIndexPath, default: ""] + text
}