presentModalViewController水平而不是垂直

时间:2011-05-26 01:14:00

标签: iphone objective-c cocoa-touch

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

当前代码:

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

1 个答案:

答案 0 :(得分:3)

presentModalViewController:animated:可用的唯一选项是:

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

由于你使用的是navigationController,所以你想做的可能是:

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