NSmanagedObject copyWithZone issues

三世轮回 提交于 2019-12-02 01:37:25

NSManagedObject does not conform to the NSCopying protocol. If you want to create a new record with the same data, just insert a new object and assign the values from the first object to the second object.

You will need to create a new Thing the same way you created the original Thing something like

Thing *regCopy = [NSEntityDescription insertNewObjectForEntityForName:@"Thing" inManagedObjectContext:self.managedObjectContext]

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!