当我使用[[UIApplication sharedApplication] setStatusBarHidden:__ animated:__]
隐藏状态栏时,我在屏幕顶部有一个空白区域。我知道这是状态栏。如果我只使用一个简单的UIViewController
作为我的主视图控制器,我可以将视图的帧设置为(0, 0, 320, 480)
以覆盖白色的sapce。但是当我使用UINavigationController
时,我不知道该怎么做。
有人都知道吗?如果你没有时间编写代码,请给出一些建议。我可以使用您提供的建议进行一些研究。
提前致谢。
答案 0 :(得分:0)
我估计您必须访问UINavigationController中currentViewController的视图并修改该视图框架。
NSArray *controllers = [navController viewControllers];
// loop through and find the controller you want
// controller.frame.size.height= newHeight
您可能还需要更改根视图控制器的视图大小。