Iphone iOS位于呼叫状态栏中,位于顶部导航栏上方

Iphone iOS位于呼叫状态栏中,位于顶部导航栏上方,iphone,ios,uinavigationbar,mapkit,Iphone,Ios,Uinavigationbar,Mapkit,我的iPhone应用程序有一个小问题。在我的UIView NIB上,在调用状态栏出现之后,视图的大小无法正确调整。具体来说,导航栏的顶部隐藏在状态栏下面 这三幅图显示了呼叫状态栏中的before、during和after。我的问题显示在最后一张图片中。 我使用以下代码调用nib: - (IBAction)showMapClicked:(id)sender { if (childController == nil) { childController = [[MapVi

我的iPhone应用程序有一个小问题。在我的UIView NIB上,在调用状态栏出现之后,视图的大小无法正确调整。具体来说,导航栏的顶部隐藏在状态栏下面

这三幅图显示了呼叫状态栏中的before、during和after。我的问题显示在最后一张图片中。

我使用以下代码调用nib:

- (IBAction)showMapClicked:(id)sender 
{
    if (childController == nil) {
        childController = [[MapViewController alloc] initWithNibName:@"MapViewController" bundle:nil];
    }

    [self.navigationController pushViewController:childController animated:YES];
}
我发现这个问题很严重,但它似乎没有涵盖我的问题:


感谢您对如何修复的任何见解。

我已经设法解决了这个问题。我用这段代码隐藏了页面上的选项卡栏,它弄乱了页面的顶部:

CGRect bounds = [[UIScreen mainScreen] bounds];
CGRect tabBarFrame = self.tabBarController.tabBar.frame;
self.tabBarController.view.frame = GRectMake(0, 0, bounds.size.width, bounds.size.height+tabBarFrame.size.height);
我应该做的是实现这一点:

-(BOOL)按下按钮时隐藏底部条形图{
返回YES;
}