내 탐색 컨트롤러가 제대로 작동하는 데 문제가 있습니다! RootViewController에서 테이블의 셀을 클릭하면 다음 ViewController가 나타나지 않습니다.UINavigationController - 응용 프로그램이 대상에서 nil보기 컨트롤러를 밀어 넣으려고했는데 무엇이 누락 되었습니까?
오류 메시지가
"응용 프로그램이 대상 에 전무 뷰 컨트롤러를 밀어했습니다."읽고
는
그래서 나는, 내, 내가 아마에서 중요한 뭔가가 추측 한 잘못을 ALLOC 내가 따라하는 책.
그래서 문제는 내 RootViewController.m 여기에 나타납니다 내 AppDelegate.m에서
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
UINavigationController *navigationController= [[UINavigationController alloc]init];
switch ([indexPath row]) {
case 0:
[navigationController pushViewController:kundeViewCon animated:YES];
break;
case 1:
[navigationController pushViewController:kalenderViewCon animated:YES];
break;
case 2:
[navigationController pushViewController:wunschViewCon animated:YES];
break;
}
}
내가있는 navigationController로 RootViewController 설정하기 위해 다음과 같은 일을하고있는 중이 야 : 그래서
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
// Navigation Controller
RootViewController *rootViewController = [[RootViewController alloc]init];
navigationController = [[UINavigationController alloc]initWithRootViewController:rootViewController];
self.window.backgroundColor = [UIColor whiteColor];
[self.window addSubview:navigationController.view];
[self.window makeKeyAndVisible];
return YES;
}
을 셀을 클릭하면 푸시 할 다른 모든 ViewController가 있습니다. 나는 내 잘못이나 내가 무엇을 놓치고 있는지를 볼 수 없다!?
어쩌면 누군가 나를 도울 수 있고 나에게 힌트를 줄 수 있습니다! 그게 좋을거야!
만들어진? –
이것은 모두 별개의 클래스이며 RootViewController.h보다 생성됩니다 – julesmummdry
(at)를 설정할 수 없습니다. 사용자를 지정하면 (at)가 있으므로 class KundeViewController; class KalenderViewController; 클래스 WunschViewController; 인터페이스 RootViewController : UITableViewController { KundeViewController * kundeViewCon; KalenderViewController * kalenderViewCon; WunschViewController * wunschViewCon; } 끝 –
julesmummdry