问题描述
我想全屏显示 UIView
,但显示状态栏,其他内容,如导航栏需要通过覆盖的UIView
。
I want to show the UIView
in full screen, but show the status bar, other things, like the navigation bar need to cover by the UIView
.
我该怎么做?
推荐答案
苦苦挣扎以完全理解这个问题,但我想你是在问如何在另一个视图上方显示 UIView
(以便带有导航控件的视图完全隐藏在第二个视图中)?
Struggling a little to fully understand the question, but I think you're asking how you can display a UIView
above another view (so that the view with the navigation controls is completely hidden by the second view)?
UIViewController
有:
- (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated
将第二个视图管理为 UIViewController
也是明智之举。为了举例,我们假设您的导航栏视图由 UINavigationViewController
管理,您要显示的视图由 otherViewController管理
...
It would be wise to have your second view managed by a UIViewController
, too. For the sake of example let's say your view with the navigation bar is managed by UINavigationViewController
, and the view you want to display is managed by otherViewController
...
[navigationViewController presentModalViewController:otherViewController animated:YES];
这篇关于如何制作一个可以覆盖导航栏的UIView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!