CoreData: How to fetch a specific object using a predicate

后端 未结 4 1193
不知归路
不知归路 2020-12-30 03:13

The situation:

I fetch a complete table from my sqllite core data database and show it in a TableView like this:

NSEntityDescriptio         


        
4条回答
  •  [愿得一人]
    2020-12-30 03:27

    This is proper predicate:

    [NSPredicate predicateWithFormat:@"SELF = %@", objectID];
    

    Where objectID is NSManagedObjectID instance.

提交回复
热议问题