Muruganandam.S Muruganandam.S - 1 year ago 200
Objective-C Question

UIView Animation

I need to flip my view horizontally.

I tried to flip along with the navigation Controller when i did this my background screen becomes black

How to avoid this?

I tried this code..

HomeViewController *homeVC = [[HomeViewController alloc] init];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:homeVC];
nav.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
nav.modalPresentationStyle = UIModalPresentationFormSheet;
[[self navigationController] presentViewController:nav animated:YES completion:^{
[Constants showHomeScreenOnViewController:self];

Answer Source

Please try the below code :-

UIViewController *controller = [[[MyViewController alloc] init] autorelease];
UIViewAnimationTransition trans = UIViewAnimationTransitionCurlUp;
[UIView beginAnimations: nil context: nil];
[UIView setAnimationTransition: trans forView: [self window] cache: YES];
[navController presentModalViewController: controller animated: NO];
[UIView commitAnimations];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download