Lazy loading variable error
问题 I am writing a program that involves core data. I created a class variable for my context and entity and have my code written like this: class PersistencyManager { var context : NSManagedObjectContext{ let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate let localContext = appDelegate.managedObjectContext return localContext } var userEntity : NSEntityDescription { let entity = NSEntityDescription.entityForName(EntityNames.User, inManagedObjectContext: context) return