코어 데이터 프로젝트에서는 필자의 인터페이스 (테이블)에 사람에 관한 데이터를 편집하고 db에 저장하는 두 개의 단추가 있으며 실제 저장하지 않고 시각적으로 데이터를 둘러 볼 수 있습니다 DB에. 핵심 데이터 객체를 분리하여 데이터베이스에 데이터를 쓰지 않도록하려면 어떻게해야합니까? 나는 NSManagedObject 클래스를 모방 한 새로운 NSObject 클래스를 작성하고 NSObject 클래스로 데이터를 이동하려고 시도했지만 여전히 db를 변경합니다!관리 데이터를 핵심 데이터에서 분리하는 방법은 무엇입니까?
//button for editing and saving
PersonObj *person = (PersonObj *)[fetchedResultsController objectAtIndexPath:indexPath];
PersonEditViewController *editViewController = [[PersonEditViewController alloc] initWithStyle:UITableViewStyleGrouped];
// puts the managed object into the new view controller
editViewController.person = person;
[self.viewController pushViewController:editViewController animated:animated];
[editViewController release];
//button for editing and NOT saving
PersonObj *person = (PersonObj *)[fetchedResultsController objectAtIndexPath:indexPath];
PersonFiddlingViewController *fiddling = [[PersonFiddlingViewController alloc] initWithStyle:UITableViewStyleGrouped];
// move db data into non-db class??? not working
fiddling.eyeColor = person.eyeColor;
fiddling.name = person.name;
[self.viewController pushViewController:fiddling animated:animated];
[fiddling release];