您的位置:首页 > 产品设计 > UI/UE

presentModalViewController使用 UIModalPresentationFormSheet,无法改变frame大小

2012-05-11 11:10 686 查看
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;

注意:/it's important to do this after presentModalViewController

可以按以上方法实现。

用另外一种方式,你用的这种是针对整个controller的,你可以用[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft

// forView:theView cache:YES];

但一般情况下,modal view更适合iPhone,iPad用UIPopoverController。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: