In a Master-Detail project, how do I keep the selected row to remain selected when the Master Scene hides when run on an iPad?

In a Master-Detail project, how do I keep the selected row to remain selected when the Master Scene hides when run on an iPad?

Accepted Reply

You mean selectedRow in Master ?


Isn't it kept in tableView.indexPathForSelectedRow ?


If not, in didSelectRow, save it in a master property:

let selectedRow = tableView.indexPathForSelectedRow


and set the selection when the view appears.

Replies

You mean selectedRow in Master ?


Isn't it kept in tableView.indexPathForSelectedRow ?


If not, in didSelectRow, save it in a master property:

let selectedRow = tableView.indexPathForSelectedRow


and set the selection when the view appears.