0

我有一个带有 5 个选项卡视图的故事板。它始终默认为 first。我希望它是应用程序启动时始终首先显示的第三个视图。

我怎么做?我无法从情节提要界面中弄清楚。

4

1 回答 1

0

行。找到了答案:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  UITabBarController *tabBar = (UITabBarController *)self.window.rootViewController;
  tabBar.selectedIndex = 2;  // zero based index of desired default tab to launch with.
  return YES;
}
于 2012-08-09T02:37:46.507 回答