Sunday 15 September 2013

ios - AppDelegate type var is not member unless in func (see pictures) -



ios - AppDelegate type var is not member unless in func (see pictures) -

i'm starting swift, have objective-c background... anyways, why when do:

i error, when set in func like:

there isn't error?

also, can please right terms? appdel reference or variable? in advanced - please edit or tell me what's wrong question :)

you can't access self when setting default value.

mark lazy attribute can trick:

lazy var context: nsmanagedobjectcontext = self.appdel.managedobjectcontext

ios xcode swift member appdelegate

No comments:

Post a Comment