如何复制NSManagedObject以传递给新的viewcontroller?

时间:2011-01-19 17:21:01

标签: ios nsmanagedobject

我想将NSManagedObject的副本传递给新的viewController。我该如何制作该物品的副本?

Store *store = [self.stores objectAtIndex:indexPath.row]; //stores in an array of stores

StoreDetailViewController *v = [[StoreDetailViewController alloc] initWithText:@"" forStore:store];
[self.navigationController pushViewController:v animated:YES];
[v release]; 

1 个答案:

答案 0 :(得分:0)

您无法发送NSManagedObject copy条消息,因为它不符合NSCopying协议。