"Flip UIView"

Fri 16 October 2009

-(IBAction)flipAction{

NSLog(@"flip");

[UIView beginAnimations:nil context:NULL];

[UIView setAnimationDuration:1];

[UIView setAnimationTransition: UIViewAnimationTransitionFlipFromRight

  forView:self.view cache:YES];

if ([discoView superview]){

[discoView removeFromSuperview];

[termsView addSubview:flipButton];

[self.view addSubview:termsView];

}

else

{

[termsView removeFromSuperview];

[self.view addSubview:discoView];

[discoView addSubview:flipButton];

}

[UIView commitAnimations];

}