ios - Error in class method when implementing Core Data Stack -
i followed this tutorial implement core data stack , i'm getting error in temporaryworkercontext class method.
+ (nsmanagedobjectcontext *)temporaryworkercontext { nsmanagedobjectcontext *tempmocontext = [[nsmanagedobjectcontext alloc] initwithconcurrencytype:nsprivatequeueconcurrencytype]; tempmocontext.parentcontext = _mainmanagedobjectcontext;<--error here: instance variable '_mainmanagedobjectcontext' accessed in class method return tempmocontext; }
my question is, correct way implement core data stack without errors? class method required, controller calling hold strong reference temporaryworkercontext.
Comments
Post a Comment