tags:

views:

168

answers:

3

Stupid question of the day: where can I find info in the docs about creating flipside views??? Thanks

+1  A: 

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:

  1. Open Xcode
  2. File => New Project
  3. 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.

Jonathan Sterling
+2  A: 

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.

Ben Gottlieb
+2  A: 

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];
alecf