If I remember well, when you return from the messageViewController, you reload the table.
But you can use state restoration :
If you assign a value to a table view’s
restorationIdentifier
property, it attempts to preserve the currently selected rows and the first visible row. The table’s data source may adopt the
UIDataSourceModelAssociation
protocol, which provides a way to identify a row’s contents independent of that row’s position in the table. If the table’s data source adopts the
UIDataSourceModelAssociation
protocol, the data source will be consulted when saving state to convert the index paths for the top visible row and any selected cells to identifiers. During restoration, the data source will be consulted to convert those identifiers back to index paths and reestablish the top visible row, and reselect the cells. If the table’s data source does not implement the
UIDataSourceModelAssociation
protocol, the scroll position will be saved and restored directly, as will the index paths for selected cells.
For more information about how state preservation and restoration works, see App Programming Guide for iOS.