【问题标题】:status bar is overlapping with navigation bar when showing uiviewcontroller with uipresentviewcontroller使用 uipresentviewcontroller 显示 uiviewcontroller 时,状态栏与导航栏重叠
【发布时间】:2015-09-16 09:36:35
【问题描述】:

我在我的应用程序中展示了一个 uiviewcontroller,但该控制器与状态栏重叠。它只有导航栏,因此我的 barbutton 与状态栏中的电池图标重叠。在状态栏下方显示导航栏有什么想法吗?我搜索了很多,但找不到解决方案。我展示视图控制器的代码:

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

【问题讨论】:

  • 能否附上屏幕短片。
  • 您必须将导航栏向下移动 20 像素。

标签: ios iphone swift


【解决方案1】:

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

self.edgesForExtendedLayout = []

ObjectiveC C

self.edgesForExtendedLayout = UIRectEdgeNone;

【讨论】:

    猜你喜欢
    • 2013-02-04
    • 2023-04-09
    • 2016-04-08
    • 1970-01-01
    • 1970-01-01
    • 2018-03-03
    • 2016-03-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多