开发者

How do I do a View Transition in an iPhone app without allowing back?

开发者 https://www.devze.com 2022-12-10 07:09 出处:网络
This is a total noob question. I have a starting view -- it\'s very simple: just some text and a button. When the user clicks the button, I want to go to the real \"meat\" of the application, which i

This is a total noob question.

I have a starting view -- it's very simple: just some text and a button. When the user clicks the button, I want to go to the real "meat" of the application, which is a Navigation/Table View. How do I connect the button on the IntroViewController to a transition to the RootViewController? I don't want to make the IntroViewController a full Navigation controller and push the new view because that lets the 开发者_运维技巧user go back. I'm looking for some combination of code snippets and Interface Builder instructions.


If you're using a UINavigationController you could just use setViewControllers:animated:

You could even fake your "back" history if you wanted to go to someplace you've never been before.

For the comments below, here's what I have in my application delegate:

- (void)applicationDidFinishLaunching:(UIApplication *)application {

        // Override point for customization after app launch
        navController = [[UINavigationController alloc] initWithRootViewController: viewController];
        [window addSubview:navController.view];
        [window makeKeyAndVisible];
}
0

精彩评论

暂无评论...
验证码 换一张
取 消