gpt4 book ai didi

ios - 使用 uipresentviewcontroller 显示 uiviewcontroller 时,状态栏与导航栏重叠

转载 作者:行者123 更新时间:2023-11-30 14:04:18 26 4
gpt4 key购买 nike

我在我的应用程序中呈现了一个 uiviewcontroller,但 Controller 与状态栏重叠。它只有导航栏,因此我的栏按钮与状态栏中的电池图标重叠。有什么想法可以在状态栏下方显示导航栏吗?我搜索了很多但找不到解决方案。我的代码来呈现 View Controller :

let timeVCObejct = self.storyboard?.instantiateViewControllerWithIdentifier("TimeConfigurationViewController") as? TimeConfigurationViewController
timeVCObejct?.delegate = self
self.presentViewController(timeVCObejct!, animated: true, completion: nil)

最佳答案

为您的 VC 使用此属性,以避免您的状态栏与您的 VC 重叠 swift :

self.edgesForExtendedLayout = []

objective-c C

self.edgesForExtendedLayout = UIRectEdgeNone;

关于ios - 使用 uipresentviewcontroller 显示 uiviewcontroller 时,状态栏与导航栏重叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32604866/

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