开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜