2011-05-26 79 views
0

如何让模态视图控制器呈现水平而不是垂直。presentModalViewController水平而不是垂直

当前代码:备有presentModalViewController:animated:

ListSelectViewController *nextScreen = [[ListSelectViewController alloc] init]; 
[self.navigationController presentModalViewController:nextScreen animated:YES]; 
[nextScreen release]; 

回答

3

唯一的选项是:

  • UIModalTransitionStyleCoverVertical(默认)
  • UIModalTransitionStyleFlipHorizontal
  • UIModalTransitionStyleCrossDissolve
  • UIModalTransitionStylePartialCurl

由于您使用的是navigationController,也许你想要做的,而不是什么:

[self.navigationController pushViewController:nextScreen animated:YES]; 
+0

,如果你不使用的是什么navigationController? – 2011-12-16 04:42:32

+0

@SeungUnHam:建议您提出一个新问题,但我的建议是使用导航控制器,并将其navigationBarHidden属性设置为YES,如果您不想显示导航栏但仍能够进行推送。 – Anna 2011-12-16 13:29:58

+0

好听起来合理的谢谢 – 2012-01-17 22:16:53