NSManagedObject的实体是什么? [英] What is the entity for my NSManagedObject?
本文介绍了NSManagedObject的实体是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个视图控制器,可以从我的MOC中获取许多不同类型的实体。我该如何知道NSManagedObject类型的对象的实体是什么?
I have a view controller that can fetch many different types of entities from my MOC. How can I tell what the entity is for an object of the type NSManagedObject?
推荐答案
[managedObject实体]
将为您提供 NSEntityDescription
。从那里,您可以将其发送为-名称
以获取更加用户友好的实体名称。
[managedObject entity]
will give you an NSEntityDescription
. From there you can send it -name
to get the entity's name that's a bit more user-friendly.
这篇关于NSManagedObject的实体是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文