我想保存JSON響應本地核心數據爲我的應用程序。我下面以下實現此: https://stackoverflow.com/a/2363996/127036JSON核心數據
這裏是我的代碼:
NSString *objectName = @"Post";
NSManagedObject *managedObject = [NSEntityDescription insertNewObjectForEntityForName:objectName inManagedObjectContext:moc];
[managedObject setValuesForKeysWithDictionary:structureDictionary];
編譯器返回以下錯誤:
-[__NSCFDictionary entity]: unrecognized selector sent to instance 0x6dc6fa0
雖然試圖執行:
setValuesForKeysWithDictionary
請引導我在正確的方向f ix這個問題。
你的'structureDictionary'裏有什麼? – iHunter 2012-01-03 20:24:23