Mapedd
Mapedd

Reputation: 722

After relaunch, application hides navigation bar in three20

i've got a small problem:

i've written a small project which is using tabBarController, implementation file have only this methood:

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

in appDidFinishLaunching in my appDelegate, tab bar is mapped like this:

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

the problem is when app quits, and then reopen again, it don't fully remember the state before quiting, the navigationBar is hidden and no viewController is picked on tabBar, it looks like this:

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

but it should be like this:

in next post

does anybody seen this and know the way to fix it?

Upvotes: 1

Views: 443

Answers (2)

Johann Romefort
Johann Romefort

Reputation: 91

You probably need to specify the parent property for your view controllers as follows:

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

Upvotes: 1

angelokh
angelokh

Reputation: 9428

I had same problem as yours. I assume you have four mapping urls at your AppDelegate. After read this post (http://groups.google.com/group/three20/browse_thread/thread/ec022b9aaa39f366/) and changed to toSharedViewController from toViewController, the navigation bar shows up after relaunch.

[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]];

Upvotes: 0

Related Questions