My xcode version is 6.3.2. I ref https://stackoverflow.com/a/25856755/685060. I had use lazy
but tell me my class does not have this member. Can I use this method? or should I need create a function to return appDelegate and lazy to call it? Thanks your help.
class TableViewController: UITableViewController, DetailViewControllerProtocol {
let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
lazy var managedContext = self.appDelegate.managedObjectContext // This line
....