Staff Recovery with Multiple Storyboards

I am working on a project with several cryptic versions. I want to implement state restoration in this project. I had a problem connecting ViewControllers on the second storyboard during the state recovery process.

encodeRestorableStateWithCoder: and decodeRestorableStateWithCoder: methods are called only for ViewControllers associated with the Main storyboard.

How do you associate ViewControllers in the second storyboard with the state recovery process?

+6
source share
1 answer

When you load a class from another storyboard, you need to start using a manual approach to restoring state. (so-called recovery classes)

This means that the view controller loaded on the second storyboard must have a recovery identifier assigned and implement the UIViewControllerRestoration protocol.

+1
source

Source: https://habr.com/ru/post/975936/


All Articles