I have an CoreData model with the entity Person
and an attribute called name
. I store 4 strings into name
(Pete
, Paul
, Dan
and Jo
). Now I'd like to find out which indexPath Paul
has. How can I do this?
My CoreData model:
I have an CoreData model with the entity Person
and an attribute called name
. I store 4 strings into name
(Pete
, Paul
, Dan
and Jo
). Now I'd like to find out which indexPath Paul
has. How can I do this?
My CoreData model:
To display Core Data entities in a table view, you should use a
NSFetchedResultsController
. One requirement is that the entities you fetch must be sorted, so the index path is unequivocal.To find the index path of a
Person
object in your fetched results controller driven table view, use