Please - reffer for the following documentation page:
https://developer.apple.com/documentation/uikit/uiviewcontroller/restoring_your_app_s_state
The sample supports two state preservation approaches. In iOS 13 and later, apps save the state for each window scene using NSUserActivity objects. In iOS 12 and earlier, apps preserve the state of their user interfaces by saving and restoring the configuration of view controllers.
It's also contains demo project - so you can use it for implementation details.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: