2010-10-13 78 views
1

我有一個小問題:重新開張後,應用程序隱藏在three20導航欄

我寫這是使用tabBarController一個小項目,實現文件只有這methood:

- (void)viewDidLoad { 
[self setTabURLs:[NSArray arrayWithObjects: 
    @"tt://tableWithShadow", 
    @"tt://launcher", 
    @"tt://characterList", 
    @"tt://mapViewController", 
    nil]]; 
} 

在appDidFinishLaunching在我的appDelegate,標籤欄被映射這樣的:

[map from:@"tt://tabBarCon" toSharedViewController:[TabBarController class]]; 

的問題是,當應用程序退出,然後再重新打開,它不完全記得ST吃在quiting前,的導航欄是隱藏的,沒有的viewController被欺負TabBar,所以它看起來像這樣:

http://dl.dropbox.com/u/8583302/Zrzut%20ekranu%202010-10-13%20%28godz.%2015.17.11%29.png

,但它應該是這樣的:

在接下來的文章

是否有人看到這一點,並知道如何解決它?

回答

1

你可能需要指定parent屬性爲您的視圖控制器如下:

[map from:@"tt://tableWithShadow" 
     parent:@"tt://tabBarCon" 
     toViewController:[TableWithShadowViewController class] 
     selector: nil 
     transition: 0]; 
0

我有同樣的問題你。我假設你的AppDelegate有四個映射網址。閱讀本文後(http://groups.google.com/group/three20/browse_thread/thread/ec022b9aaa39f366/)並將其更改爲toViewController中的SharedViewController後,導航欄會在重新啓動後顯示。

[map from:@"tt://tableWithShadow" toSharedViewController:[TableWithShadowController class]]; 
[map from:@"tt://launcher" toSharedViewController:[LauncherController class]]; 
[map from:@"tt://characterList" toSharedViewController:[CharacterListController class]]; 
[map from:@"tt://mapViewController" toSharedViewController:[MapViewControllerController class]];