0

I have a rectangular view at the center of a view in iPad. When I press a button I want that rectangular view to flip and show a modal view with some information. How can achieve this instead of flip all the entire main view?

Thanks in advance.

Samui
  • 1,384
  • 3
  • 14
  • 28

2 Answers2

0

Have a look at the different modal view transition styles:

http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/modalTransitionStyle

Peter Willsey
  • 1,078
  • 6
  • 18
  • I know all the transition styles... but that I want to achieve is to flip an individual subview and show a modal view on the other side... – Samui May 03 '12 at 19:52
0

I've got it!

This is the solution I've used:

[UIView transitionWithView:self.tutorialView
                  duration:0.4
                   options:UIViewAnimationOptionTransitionFlipFromLeft | UIViewAnimationOptionCurveEaseInOut
                animations:^{
                    [[[self.tutorialView subviews] objectAtIndex:0] removeFromSuperview],
                    [self.tutorialView addSubview:infoView.view];
                }
                completion:^(BOOL finished){

                }];
Samui
  • 1,384
  • 3
  • 14
  • 28