gpt4 book ai didi

iphone - iOS通话状态栏覆盖顶部导航栏

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:16:35 24 4
gpt4 key购买 nike

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

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

我使用此代码调用 Nib :

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

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

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

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

最佳答案

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

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 {
返回是;
}

关于iphone - iOS通话状态栏覆盖顶部导航栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9599560/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com