Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法为 Core Data 的数据模型中的实体、属性和关系添加注释?随着我的模型变得越来越复杂,发表评论会很有用,但我还没有看到任何方法可以做到这一点。当然,如果可以通过迁移保留评论也会很有帮助。
无法直接向您的 Core Data 模型添加注释,但在 X-code 中查看模型,您可以在实体检查器的右下角切换到 Table、Graph 编辑器样式。如果您已按逻辑构建该视图,则该视图应该可以作为模型的大量文档。
当然,您总是可以在您的 App Delegate 中添加一个注释部分,涵盖您的核心数据模型的结构,但我想您确实知道这一点。