nsattributedescription

CoreData getting attribute type - how to determine if it is a primitive

醉酒当歌 提交于 2020-01-05 09:36:19
问题 I'm trying to get all the attributes for an entity and then determine their type - I know I can do something on this line: if(![[thisAttribute attributeValueClassName] isKindOfClass:[NSString class]]) { but how do I check for a BOOL, Float or Integer? Here's my code so far: //get the attributes for this entity - we need to parse the dictionary of data we want to store and convert its contents from NSStrings to whatever type the entity requires NSEntityDescription* entity =