wordpress-mobile/WordPress-iOS — pull request #693 by mikejohnstn (2013-11-27 20:53:08+00:00)
Title: Issue/459 save state

Implements #459. Use `UIViewControllerRestoration` and its corresponding patterns to preserve and restore state for:
* The tab bar (which tab is selected).
* Blog picker inside My Blogs (which blog you were working with).
* Blog detail view: restores Posts, Pages, Comments, and Stats.

To test this, you need to move the app to the background before stopping it from Xcode. `UIViewControllerRestoration` is smart enough to not preserve/restore state if the app crashes or is otherwise forced to shut down.

Some decisions and conscious limitations:
* I only supported controllers I thought would be most frequently used (e.g. it doesn't preserve/restore Settings).
* There's some repeated restoration code, in particular for `viewControllerWithRestorationIdentifierPath:coder:`. Subclasses of `WPTableViewController` reuse common code, but I chose not to abstract away some logic for two other controllers, since they may need custom logic in the future.