最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

ios - NSUserActivity State Restoration of a UITabViewController with UINavigationControllers - Stack Overflow

programmeradmin1浏览0评论

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?

发布评论

评论列表(0)

  1. 暂无评论