admin管理员组

文章数量:1302981

I am working to migrate my project over to using scenes and am needing to rebuild my State Restoration code to using NSUserActivity. I would love to stay on the viewController based state restoration but using CarPlay is requiring that I switch to scenes.

I have searched for resources and also looked at the Apple project which is overly complex and does not help a person understand how to use Scene based state restoration.

My app has a very large navigation hierarchy as a user could navigate through multiple screens and the navigation stack can become quite large.

A few specific questions come to mind:

  • How does NSUserActivity know which viewController to restore and when if it was in the stack of a UINavigationController?
  • How does the individual viewController get restored of the correct class?

Can anyone provide a simple example of how to restore a UITabViewController based app that uses UINavigationController?

本文标签: iosNSUserActivity State Restoration of a UITabViewController with UINavigationControllersStack Overflow