Quote:
Originally Posted by rhimbo
I am playing around trying to create an app that will have multiple screens that the user progresses through. I think I want a navigation-based app but am not sure.
The first screen will be some kind of scrollable view, for instance I might want to put a legal disclaimer there and let the user hit "continue" or "exit" to advance or terminate.
On the next screen I want to display some graphics, maybe an animation using pre-defined PNGs. I think the screen would combine some CF graphics (maybe I'll draw some lines myself) and overlay predefined PNGs.
|
You can use the "view based application" xcode template and then define all your own views and controls for moving between them. So assume you create an app called MyApp. In the MyApp.xib put a button labeled "continue" and wire it up to a method called continuePressed. Now create a second xib with your second screen view and hook it up to a class called SecondViewController. In continuePressed you'd do something like this to flip the screen over to the second view:
Code:
SecondViewController *view2 = [[SecondViewController alloc] initWithNibName:@"SecondView" bundle:nil];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES];
[self.view addSubview:view2.view];
[UIView commitAnimations];
after the view flips over you'll be in the SecondViewController class in the viewDidLoad method and you can do whatever you need to do there.