I'd like to get an array of the attributes for my NSManagedObject
so I can use KVO to export them. I can create an array manually and then iterate through it, however, I'd like to get this list automatically, then iterate.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
- How can I add media attachments to my push notific
An NSManagedObject has an entity associated with it. Use NSEntityDescription's
-attributesByName
and-relationshipsByName
. You'll get a dictionary back from each of those methods. Just ask the dicts for their-allKeys
.Thanks Joshua. Here's code that I used in case any one would like to see a hard example: