/ Published in: Objective C

the controllers view is setup s.t. it adds the mainView as a subview to its default view in the init method
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
- (void) flipView { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:kTransitionDuration]; [UIView setAnimationTransition:([mainView superview] ? UIViewAnimationTransitionFlipFromLeft : UIViewAnimationTransitionFlipFromRight) forView:self.view cache:YES]; if ([flipView superview]) { [flipView removeFromSuperview]; [self.view addSubview:mainView]; } else { [mainView removeFromSuperview]; [self.view addSubview:flipView]; } [UIView commitAnimations]; }
Comments
