【发布时间】:2023-03-09 13:03:01
【问题描述】:
我是 iPhone 新手,
我想将我的 Rootviewcontroller 更改为我的新类并使其成为导航控制器。
这是我的代码 sn-p,
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
UINavigationController *navigationController=[[UINavigationController alloc] initWithRootViewController:detailViewController];
[self.window addSubview:navigationController.view];
[self.window makeKeyAndVisible];
return YES;
}
我收到SIGABRT 说'adding a root view controller <NewClass: 0x6a8dd50> as a child of view controller:
【问题讨论】:
标签: iphone ios ipad uinavigationcontroller rootview