보기 컨트롤러에서 다른 컨트롤러로 객체를 전달하려고합니다. destinationController에서 나는이 : 내가 가지고있는 정보를 포함하는의 ViewController에서xcode는 segue를 사용하여 객체를 전달합니다.
@interface destinationController : UITableViewController{
destinationController *object;
@property(nonatomic,copy) destinationController *object;
다음 vcArray이 번호와 이름하지만 난 단지 선택된 행을 원을 포함
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
[self performSegueWithIdentifier:@"destinationController" sender:self];
- (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
if ([[segue identifier] isEqualToString:@"destinationController"])
{
destinationController *dC =[segue destinationViewController];
NSInteger selected = [[self.tableView indexPathForSelectedRow] row];
dC.object=[vcArray objectAtIndex:selected];
. 선택한 개체를 destinationController의 개체로 전달하려고해도 작동하지 않는 것 같습니다.
[의 ViewController copyWithZone :] : 08 : 인식 할 수없는 선택 예를 0x8000140에 2012년 11월 14일 18 전송 25.039 응용 프로그램 [3314 : 13d03] * 응용 프로그램을 종료로 인해 NSInvalidArgumentException '캐치되지 않는 예외에 대신 나에게 오류를 제공합니다 '이유'- [의 ViewController copyWithZone는 :] (0x18e6012 0x12abe7e 0x19714bd 0x18d5bbc 0x18d594e 0x12a8cc9 0x83b2 0x5c22 0x63aac7 0x2d5422 0x5a68 0x2a28d5 0x2a2b3d 0xca9e83 0x18a5376 0x18a4e06 0x188ca82 0x188bf44 0x188be1b 0x1dae7e3 0x1dae668 0x1f365c : 미정 선택기 * 인스턴스 0x8000140 '에 우선 투사 호출 스택을 보내 0x1f4d 0x1e75) libC++ abi.dylib : 예외 던집니다. 종료
나는 문제가 내가 제대로 문제는 귀하의 속성 선언에있는 객체
가에 대해 불평 실제 오류를 보여주는 선택하고있는 클래스 질문을 업데이트하십시오 :
당신은 아마이 선언을 변경해야합니다. –