In iOS 5 it runs correctly:
PinRequiredViewController *pinView = [[PinRequiredViewController alloc]initWithNibName:@"PinRequiredView" bundle:nil];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:pinView];
// show the navigation controller modally
navController.modalPresentationStyle = UIModalPresentationFormSheet;
navController.modalInPopover = NO;
navController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentViewController:navController animated:YES completion:nil];
navController.view.superview.frame = CGRectMake(0, 0, 250, 250);
navController.view.superview.center = self.view.window.center;
But not working fine in iOS6, the view does not stay centered in the screen, both portrait and landscape.
Any solutions?
Thanks!! 🙂
I think it’ll work if you remove the
UIModalTransitionStyleFlipHorizontaltransition style and use one of the other transition styles instead.Seems like it’s a bug with
UIModalTransitionStyleFlipHorizontal.