override func viewWillAppear(_ animated: Bool) {
let appDelegate = UIApplication.shared().delegate as! AppDelegate
let managedContext = appDelegate.managedObjectContext
let fetchRequest = NSFetchRequest(entityName: "ListEntity") Generic parameter 'Result Type' could not be inferred
do {
let results = try managedContext.fetch(fetchRequest)
listItems = results as! [NSManagedObject]
}
catch {
print("Error")
}
}
Error: Generic parameter 'Result Type' could not be inferred
This is my code and it change from swift 2.2 to 3 and now it gives me that error on the right. If anyone could help that would be greatly appreciated.
Thanks,
TechiBot