2011-05-20 208 views

回答

1

使用UIViewController的modalPresentationStyle属性以及标准presentModalViewController:animated:。您的截图使用UIModalPresentationFormSheet。还有UIModalPresentationPageSheet,它以纵向模式显示全屏,但在横向两侧留下边界。

0

你是显示的图像是一个类型模态视图。

myViewController.modalPresentationStyle = UIModalPresentationFormSheet; 
[myViewController presentModalViewController: myModalViewController animated:YES]; 

查看UIViewController的文档进行模态视图的更多信息:你会喜欢的东西显示出来。

0

我们所用的四种不同的方式.IE 1. UIModalPresentationFullScreen 2. UIModalPresentationPageSheet 3. UIModalPresentationFormSheet 4. UIModalPresentationCurrentContext呈现modalViewController。

这里使用的是现在第三个..

,如果你不想使用这些东西只需使用下面的代码..

[self presentModalViewController Animated:YES]; 
0

从截图我认为你正在做的是这样的:

UIViewController* newController = LoadTheController(); 
newController.modalPresentationStyle = UIModalPresentationFormSheet; 

[currentViewController presentModalViewController:vc animated:YES]; 

但是你的问题是指“pushViewController”的方法,这是关系到UINavigatio nController对象,并且屏幕截图的背景中的确有一个导航控制器。你可以试试看这样的事情:

[currentViewController.navigationController pushViewController:vc animated:YES];