I have a custom pop transition and it depends on the UITableView
being scrolled to the top before performing the transition. The second I tap the back button of my UIViewController
I want to scroll the UITableView
up which will then have the correct state for my transition.
I already tried to scroll the UITableView
up before the view will get dismissed:
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
self.tableView.scrollToRow(at: IndexPath(row: 0, section: 0), at: .top, animated: false)
}
This however failed to scroll at all. How can I move the UITableView
to the top before the UIViewController
gets dismissed?