Delete/Reset all entries in Core Data?

后端 未结 30 3315
天命终不由人
天命终不由人 2020-11-22 16:00

Do you know of any way to delete all of the entries stored in Core Data? My schema should stay the same; I just want to reset it to blank.


Edit

30条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-22 16:28

    MagicalRecord makes this very easy.

    [MyCoreDataObject MR_truncateAll];
    

提交回复
热议问题