Je vais essayer de le rendre aussi simple que possible, je suis aller chercher à partir des données de base en utilisant NSFetchedResultsController mon cellForRowAtIndexPath ressemble à ceciCore Data + NSFetchedResultsController dans SWIFT
override func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell? {
var cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as UITableViewCell
let newEntry : Entry = fetchedResultController.objectAtIndexPath(indexPath) as Entry
cell.textLabel.text = newEntry.title
return cell
}
Mon application plante
Quand je remplace la ligne ci-dessous
let newEntry : Entry = fetchedResultsController.objectAtIndexPath(indexPath) as Entry
Avec cette ligne l'application fonctionne enregistrements tableview aucune erreur peuplent aucun problème
let newEntry : AnyObject! = self.fetchedResultsController.objectAtIndexPath(indexPath)
La question est pourquoi ne ANYOBJECT est une entrée NSManagedObject
Merci Vous
Conseil: deux questions doivent être écrites comme deux questions distinctes en SO. – andrewbuilder