On Jul 25, 2017, at 22:28:19, Sixten Otto <hims...@sfko.com> wrote: > > You can set a custom restorationClass on a per view controller basis, > passing the process of instantiating the controller during restoration > through your own code that knows how to check whether the document is still > there. (We do something similar in our app in some places to make sure that > our Core Data store is present, and contains the objects the stored state > had been displaying.) > > https://developer.apple.com/documentation/uikit/uiviewcontroller/1621472-restorationclass > > (It is true, though, that this cannot abort the *entire* restoration > process. Just prune sub-trees of the view controller graph.)
Close enough. The documentation for this is horribly vague. I made my VC inherit UIViewControllerRestoration and implemented viewControllerWithRestorationIdentifierPath:coder:, returning nil of the file is no longer available. Where things get confusing is the whole restorationClass property and how to implement it. I did what many suggest of setting it to my VC's class in the init or viewDidLoad method. But if I do NOT do that, everything still works correctly. -- Steve Mills Drummer, Mac geek _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com