我是 iOS 新手。主要是在Android上开发。目前接管了一个 iOS 应用程序,我必须更新它的几个功能。
这个应用程序是基于 TabBar 的。几个导航控制器被推入标签栏,管理它们之间的切换。然而,现在其中一个选项卡会打开一个带有几个选项的 ActionSheet。
我必须在其中一个 ActionSheet 按钮单击时打开一个新的 NavigationController。
这是一个定义单击了哪个按钮的片段:
switch (buttonIndex) {
case 0:
[self openMyNavigationController];
break;
case 1:
break;
case 2:
break;
default:
break;
}
我不知道 openMyNavigationController 方法应该如何
开始是这样的:
UIViewController *myViewController = [[MyViewController alloc ] nitWithNibName:@"MyViewController" bundle:nil];
UINavigationController *navMyViewController = [[UINavigationController alloc] initWithRootViewController:myViewController];
我应该怎么做才能在屏幕上显示新创建的 NavigationController?