State Restoration Sample Code Run the app and see a list of cities. Tap on any city and it would take you to its detail. Put the app in background. Stop the app using Xcode. Tap on the app to start and see that it would restore its state to detail view.