Facing issue \"Value of type \'AppDelegate\' has no member \'managedObjectContext\' In new Xcode 8 (using Swift 3, iOS 10) when trying to create new context in View Controll
First, get AppDelegate object:-
let appDelegateObject = UIApplication.shared.delegate as! AppDelegate
And now, we can get managed object as:
let managedObject = appDelegateObject.persistentContainer.viewContext