Im wondering if I can make my application structure in a way to store User
object in Core Data, without knowing to much about NSManagedObjectContext from the view controller perspective.
I want to do it like they do it in some of the frameworks like Parse for instance. Where you can save its objects locally with simple methods like [object save] or [object pin].
I know that for some more complex objects I'll definitely want to have a control over NSManagedObjectContext inside view controller. But in case ob just saving User
as currentUser and retrieve later, I really want to somehow incapsulate NSManagedObjectContext inside the object itself.
So instead of a method
[User createCurrentUserInContext:self.context]
or
[User currentUserInContext:self.context]
I just want to call
[User createCurrentUser]
or
[User currentUser]
Can you give me some advice with this. I'm looking forward to hear as many solutions as possible from you.
Thank you for your help