Saving View States
There are a number of problems with the BNRItemsViewController:
-
The UITableView is not being restored to its existing scroll position, nor is the currently selected row (if the user has drilled down into an item) being restored.
-
The view controller does not save whether or not it is in editing mode, and so it is always restored with the default value (which is not in editing mode).
You will fix the second point soon very similarly to how you encoded information for the BNRDetailViewController, but before you do let’s take a look at the first point.
In addition to the view controllers having a restoration identifier, certain UIView subclasses can have a restoration identifier to save certain information ...
Get iOS Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.