"nested push animation can result in corrupted navigation bar" when call launcherView: didSelectItem:

In the three20 TTCategory example, I am trying to modify the LauncherViewTestController to launch an test view controller. I created a TestContrller class and register as

[map from: @"tt://test" parent: @"tt://launcherTest" toViewController: [TestController class] selector: nil transition: 0];

Then in launchView:didSelectItem:, I try to navigate to this test view controller

- (void)launcherView:(TTLauncherView*)launcher didSelectItem:(TTLauncherItem*)item { TTNavigator *navigator = [TTNavigator navigator]; [navigator openURLAction:[ [TTURLAction actionWithURLPath:@"tt://test"] applyAnimated:NO]]; }

However, I keep getting "error nested push animation can result in corrupted navigation bar", and the navigation bar is not working properly with title stack on each other. I am very new to iphone development, can anybody give me some help here?

Edit, I posted my answer below, I need map to SharedViewController instead ViewController.


Here's a working example of TTLauncher i'm using and it's pushing controllers based on TTLauncherItem's action URL. registering the controllers in the app delegate is trivial, so i only including the functions for the launcher controller.

- (void)loadView {
[super loadView];

_launcherView = [[TTLauncherView alloc] initWithFrame:self.view.bounds];
_launcherView.backgroundColor = [UIColor whiteColor];
_launcherView.delegate = self;
_launcherView.columnCount = 3;

_launcherView.pages = [NSArray arrayWithObjects:
[NSArray arrayWithObjects:
[[[TTLauncherItem alloc] initWithTitle:@"Breaking News"
canDelete:NO] autorelease],

[self.view addSubview:_launcherView];

#pragma mark -
#pragma mark TTLauncherViewDelegate

- (void)launcherView:(TTLauncherView*)launcher didSelectItem:(TTLauncherItem*)item {

i find the problem is that I need map to a sharedviewcontroller instead of viewcontroller.

[map from: @"tt://test"
parent: @"tt://launcherTest"
toSharedViewController: [TestController class]
selector: nil
transition: 0];

Category:iphone Time:2011-06-21 Views:2
Tags: iphone three20

Related post

Copyright (C) pcaskme.com, All Rights Reserved.

processed in 0.842 (s). 13 q(s)