Muruganandam.S Muruganandam.S - 4 months ago 10
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];


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