I am trying to make my app resumable on older devices and need to be able to store a UIviewcontroller (so i can push it back onto the view when the app re-launches) but i cannot figure out how to store it in core data. If any one has done something similar or can开发者_如何转开发 give me a push in the right direction it would be greatly appreciated. Also if someone knows of a better way of resuming then i would love to hear it. All i have is a view (part of a UINavigation app) that contains some labels. Don't mind about the labels, i just want the app to reopen to the last open screen. Thanks
You may find the sample code DrillDownSave useful.
As far as using core data to save a view controller, You'd need to make an entity that could hold all the info you need to reconstruct the view controller, then just save that info into the store and when the app launches, retrieve the data and use it to build your view controller.
精彩评论