Newer article - https://developer.apple.com/documentation/uikit/view_controllers/preserving_your_app_s_ui_across_launches
Old article - https://developer.apple.com/library/archive/featuredarticles/ViewControllerPGforiPhoneOS/PreservingandRestoringState.html
Tutorial 1 - https://useyourloaf.com/blog/state-preservation-and-restoration/
Tutorial 2 - https://www.raywenderlich.com/1395-state-restoration-tutorial-getting-started