iPad的全屏幕模式查看TabBarController?
在iPad上的基于TabBar的应用程序中,是否有方法在“FullScreen”上显示模式?
我有一个景观只有应用程序(如果这有所作为),我想目前模式的项目,我想全屏显示,填充整个屏幕只是澄清的项目。 我可以在“PageSheet”中performance出来,而“FormSheet”是可以的,在模式视图笔尖上进行一些button调整之后,但是一旦我尝试了“FullScreen”,背景变成白色(TabBar仍然存在)如果我重试button(不重新启动模拟器),它不会回应。
该button位于呈现模式视图的视图是CountryViewController.m,并具有以下操作:
-(IBAction) showNewModal:(id)sender { modalContent.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; modalContent.modalPresentationStyle = UIModalPresentationFullScreen; [self presentModalViewController:modalContent animated:YES]; }
这个代码工作正常,没有TabBar,我意识到。 我已经寻找了几个小时来添加到这个代码,甚至在AppDelegate.h和.m文件,但到目前为止,它要么没有反应(奇怪的是不显示错误)或上述的空白。
根据我的经验,问题来自于错误的控制器的模态。
[self.tabBarController presentModalViewController:modalContent animated:YES];
应该pipe用
如果你使用iOS 4 a(或许),可以select使用:
[[UIApplication sharedApplication].keyWindow.rootViewController presentModalViewController:modalContent animated:YES];