在iOS 5中,它运行正常:
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,250,250); navController.view.superview.center = self.view.window.center;
但是在iOS6中工作不正常,视图不会在屏幕中保持居中,包括纵向和横向.
有解决方案吗
谢谢!! 原文链接:https://www.f2er.com/c/117169.html