Question

There is section in my app which has a popover in which a UITableView is presented each time the popover is presented. It's easy to navigate between the UITableViews calculating the paths of the files that are supposed to be in the next view controller and using pushViewController, as easy at it is also to popViewController when it is necessary to go back to the former UITableViews.

The problem becomes when the popover is dismissed to do some other tasks and, after that, it is necessary to get back to the popover.

Which are the best practices to get a structure capable to retain the last presented UITableView with its properties and its former UITableView so the popover is presented exactly the way it was when dismissed?

Was it helpful?

Solution

It's a basic concept issue. I hope it helps somebody else.

I was initializing the UINavigationController each time the popover was dismissed. Of course, the information I needed from the "current table view" was lost. I just turned the UINavigationController from local variable into property and now the popover is every time shown with the "current" UITableView.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top