Core Data - Limiting number of saved objects
Is there way to limit the number of saved objects in coredata like stack, where the last objects are automatic开发者_开发知识库ally deleted?
No, that is something you would need to implement in code. You can, just before you call -save:
on the NSManagedObjectContext
query the NSManagedObjectContext
for how many objects are going to be inserted and perform your custom logic at that point.
精彩评论