Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIManagedDocument and Core Data

I have found these Stanford tutorials https://itunes.apple.com/us/course/ipad-iphone-app-development/id495052415, and have been listening a lecture about core data, which is really great.

It shows how to access Core Data via UIManagedDocument... Only thing I don't understand how UIManagedDocument knows which model should it use, because I don't see it set anywhere?

To sum it when using UIManagedDocument, how do you define database model that is gonna be used?

like image 783
MegaManX Avatar asked Feb 05 '13 11:02

MegaManX


1 Answers

I found the answer:

'UIManagedDocument' takes all the models from your application's main bundle, and makes union of these models. If you only have one model that model is used.

This can be changed by overriding 'UIManagedDocument' class.

like image 175
MegaManX Avatar answered Nov 14 '22 23:11

MegaManX