UIViewController
이 여러 개인 프로젝트를 작업 중입니다. 방금 새 앱을 추가하고 새 버튼을 클릭하면 앱이 다음 오류로 인해 충돌합니다. 첫째 던져에서보기 컨트롤러 추가
2011-10-11 22:51:57.227 BG-Prep[9156:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ResourcesViewController 0x4b28540> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key delegate.'
* 콜 스택 :
코드는 잘 작동이 다른 페이지 (파일 이름 제외)과 동일하다. 이게 내가 말하는거야?
2011-10-12 14:38:51.533 BG-Prep[10070:207] Tapped the resource button
2011-10-12 14:38:51.535 BG-Prep[10070:207] receiver's type: ResourcesViewController
마지막 줄 [self presentModalViewController:resourcesViewController animated:YES];
는 응용 프로그램 충돌을 야기하지만, 왜 : 나는 두 줄의 주석 경우
- (IBAction)resourceButtonTapped:(id)sender;
{
NSLog(@"Tapped the resource button");
ResourcesViewController *resourcesViewController = [[[ResourcesViewController alloc]
initWithNibName:@"ResourcesViewController" bundle:[NSBundle mainBundle]] autorelease];
NSLog(@"receiver's type: %@", NSStringFromClass([resourcesViewController class]));
resourcesViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:resourcesViewController animated:YES];
}
, 나는 다음과를 얻을?
ResourcesViewController는 UIViewController의 하위 클래스입니까? – titaniumdecoy
예, 하위 클래스입니다 ... 위의 설명에 더 많은 정보를 추가했습니다. – padapa