I would like to print Data from CoreData in TableView for an iOS Application in Swift 3.
In the ListTableViewController file I've this code :
override func viewDidAppear(_ animated: Bool) {
let appDel: AppDelegate = UIApplication.shared.delegate as! AppDelegate
let managedObjectContext = appDel.persistentContainer.viewContext
let contxt :NSManagedObjectContext = appDel.managedObjectContext!
let freq = NSFetchRequest<NSFetchRequestResult>(entityName:"Location")
tableView.reloadData()
}
On the let context line, I've a error : "Value of type 'AppDelegate' has no member 'manageObjectContext'"
Have you an idea about my problem ?
Thank's
appDel.managedObjectContext!should be simplymanagedObjectContext!, no? - Sergey Kalinichenko!, simplylet contxt : NSManagedObjectContext = managedObjectContext, since it is not an optional - Mr. Xcoder