I have a tableViewController with a tableHeaderView. When I'm at the top of the tableView and I scroll the tableView up slightly the tableHeaderView is hidden and can reappear again by scrolling down slightly. This is the default behaviour.
When I push to a viewController then pop back to the tableViewController, the state of the tableHeaderView is preserved. i.e., if it was hidden it remains hidden and if it was visible it remains visible.
However, for some reason when I push to another viewController that has a containerView and then pop back, the tableHeaderView always displays. Even if it was hidden before pushing.