0

我有一个 TabBarController 作为我的应用程序的根,其中一个选项卡通向带有 Pin 注释的 MapView。MapView 本身嵌入在 NavigationController 中。

在选项卡之间切换时,除了第二次选择 MapView 时 TabBar 消失之外,一切正常。但是,如果随后选择了地图图钉并按下详细信息视图,TabBar 会重新出现并且随后似乎可以正常工作。

任何有关为什么会发生这种情况的帮助将不胜感激。

4

1 回答 1

0

以下情况如何:

  • 窗口 RootViewController = UINavigationController
    • YourRootController(实现 TabBarController 或子类)

代码(即在 AppDelegate 中):

YourRootCtrl *cont = [[YourRootCtrl alloc] init];

UINavigationController *navi = [[UINavigationController alloc] initWithRootViewController:cont];
navi.delegate = self;
[cont release];

[self.window setRootViewController:navi];
于 2012-07-30T12:30:02.877 回答