TTNavigator继续访问通配符页面。知道会发生什么吗?

时间:2011-04-11 22:47:11

标签: iphone three20

即使网址(即'tt:// root')有效,我的iPhone TTNavigator也会继续加载通配符页面

@synthesize navigator;

// 
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    navigator = [TTNavigator navigator];
    [navigator setWindow:window];

    // Routing Table
    TTURLMap *map = navigator.URLMap;
    [map from:@"*" toViewController:[TTWebController class]];
    [map from:@"tt://root" toViewController:[MainTabBarController class]];
    [map from:@"tt://newsfeed" toViewController:[NewsFeedViewController class]];

    // First stop
    if (![navigator restoreViewControllers]) {
        [navigator openURLAction:[TTURLAction actionWithURLPath:@"tt://root"]];
    }
}

当我注释掉重定向到WebView的通配符部分时,它会在应用程序启动时加载“tt:// root”。

知道我错过了什么吗?

干杯, 米奇

1 个答案:

答案 0 :(得分:0)

restoreViewControllers消息可恢复缓存的视图控制器。通配符映射可能是您导航到的最后一个视图,因此位于缓存的导航堆栈之上。

我首先尝试从模拟器/设备中删除应用程序,清理项目,重建并部署到模拟器/设备上。