TestViewController *testVC = [[TestViewController alloc] initWithNibName:@"TestViewController" bundle:nil];
testVC.modalPresentati*****tyle = UIModalPresentationFormSheet;
testVC.modalTransiti*****tyle = UIModalTransiti*****tyleCrossDissolve;
[self presentModalViewController:testVC animated:YES];
testVC.view.superview.frame = CGRectMake(0, 0, 649, 397);//it's important to do this after presentModalViewController
testVC.view.superview.center = self.view.center;
testVC.modalPresentati*****tyle = UIModalPresentationFormSheet;
testVC.modalTransiti*****tyle = UIModalTransiti*****tyleCrossDissolve;
[self presentModalViewController:testVC animated:YES];
testVC.view.superview.frame = CGRectMake(0, 0, 649, 397);//it's important to do this after presentModalViewController
testVC.view.superview.center = self.view.center;
注意:/it's important to do this after presentModalViewController
可以按以上方法实现。
用另外一种方式,你用的这种是针对整个controller的,你可以用[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft
// forView:theView cache:YES];
但一般情况下,modal view更适合iPhone,iPad用UIPopoverController。