我在我的应用程序中呈现了一个 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/