【问题标题】:iOS in-call status bar over-writing top navigation bariOS通话状态栏覆盖顶部导航栏
【发布时间】:2012-03-24 20:49:24
【问题描述】:

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

这三张图片显示了通话前、通话中和通话后的状态栏。我的问题显示在最后一张图片中。 Images

我使用以下代码调用笔尖:

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

    [self.navigationController pushViewController:childController animated:YES];
}

我发现了这个 SO question,但它似乎没有涵盖我遇到的问题: Resize for in-call status bar

感谢您提供有关如何修复的任何见解。

【问题讨论】:

    标签: iphone ios uinavigationbar mapkit


    【解决方案1】:

    我已经设法解决了这个问题。我正在使用此代码隐藏页面上的标签栏,它弄乱了页面顶部:

    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)hidesBottomBarWhenPushed { return YES; }

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-05-08
      • 2018-09-20
      • 1970-01-01
      • 2019-11-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-18
      相关资源
      最近更新 更多