Stupid question of the day: where can I find info in the docs about creating flipside views??? Thanks
Well, it's not really a documentation issue. The easiest way is for you to look at some code, which you can get by creating the proper Xcode project:
- Open Xcode
- File => New Project
- iPhone OS => Application => Utility Application
Study this code (use it, even). That's a really easy way to get started with a flipside view on the iPhone.
Do you mean flipping around like in the Weather app? Try taking a look at the Utility Application template in Xcode. It sets this up for you automatically.
The basics are fairly straight forward, assuming you're using UIViewControllers. You have a button hooked up to an IBAction. In the action method you set the controllers modalTransitionStyle
to UIModalTransitionStyleFlipHorizontal
and then load the controller:
- (IBAction)showInfo {
OtherController* controller = [[OtherController alloc] initWithNibName:@"SomeNib" bundle:nil];
controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController: controller animated:YES];
[controller release];
}
You'll have to be able to dismiss it, but that's not too hard. In OtherController
you just have to call dismissModalViewControllerAnimated:
:
[self dismissModalViewControllerAnimated:YES];