开发者

Core Data - Limiting number of saved objects

开发者 https://www.devze.com 2022-12-23 07:31 出处:网络
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.Yo

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消