Jua*_*uan 3 views modal-dialog tabbarcontroller ios
在iPad上基于TabBar的应用程序上,有没有办法在"FullScreen"中呈现模式?
我有一个仅限LANDTSAPE的应用程序(如果这有所不同)和我想要以模态方式呈现的项目我想要全屏显示,填写整个屏幕只是为了澄清.我可以在"PageSheet"中显示它,并且"FormSheet"没问题,在模态视图笔尖上进行了几次按钮调整后,但是一旦我尝试"FullScreen",背景变为白色(TabBar仍在那里),并且如果我重试按下按钮(不重新启动模拟器),它将不会响应.
按钮所在的视图用于显示模态视图是CountryViewController.m并具有以下操作:
-(IBAction) showNewModal:(id)sender {
modalContent.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
modalContent.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentModalViewController:modalContent animated:YES];
}
Run Code Online (Sandbox Code Playgroud)
我已经意识到,没有TabBar,这段代码工作正常.我已经花了好几个小时来添加到这段代码甚至是AppDelegate.h和.m文件,但到目前为止,它要么没有响应(奇怪的是没有显示错误)或前面提到的空格.
根据我的经验,问题来自于从错误的控制器呈现模态.
[self.tabBarController presentModalViewController:modalContent animated:YES];
Run Code Online (Sandbox Code Playgroud)
应该管用
如果你使用iOS 4(可能)beter选项是使用:
[[UIApplication sharedApplication].keyWindow.rootViewController presentModalViewController:modalContent animated:YES];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2652 次 |
| 最近记录: |