Version 1.1, 2013-07-09
Added restoration identifiers to UITextView and UITextField, fixed bug: text field was not being restored.
(Full Revision History)
iOS 6.0 SDK or later, Automatic Reference Counting (ARC)
iOS 6.0 or later
Demonstrates how to implement and debug the APIs for "State Preservation and Restoration".
The sample basically manages a list of generic "items", each having notes attached to them. The user taps an item to view it's detailed screen allowing them to type in the notes field. The app saves these items using NSKeyedArchiver.
It shows how to preserve and restore two user interfaces within the app: - the detail view controller restoring its current item, and UITextView's text content and its selection. Note that the text selection state is restored automatically for us by UIKit. - the main table view's multiple selection state, and edit mode state.