【问题标题】:How to remove the bottom white space of UIView in storyboard?如何删除情节提要中 UIView 的底部空白?
【发布时间】:2015-10-13 01:59:45
【问题描述】:

我是 iOS 开发的新手,我遇到了故事板布局的问题。

我创建了一个 UIViewController 并添加了一个容器。在这个容器中,我创建了我的布局,见下图: storyboard image

但是,当我运行我的项目时,我的布局下方有一个空白区域。我没有办法解决这个问题 Layout in the simulator

调用包含我使用的容器的 viewController:

let postView = storyboard!.instantiateViewControllerWithIdentifier("InfoPostView") as! InformationPostingViewController
        presentViewController(postView, animated: true, completion: nil)

提前致谢:)

【问题讨论】:

  • 能否添加相关代码
  • 我还没有在包含容器的视图控制器中实现任何东西,我只是使用 presentViewController 呈现它
  • 没有应用约束,这就是按钮被砍掉的原因,它可能使用默认的 600x600 布局或其他什么,所以视图控制器不知道如何将视图应用到屏幕

标签: ios swift storyboard


【解决方案1】:

您需要使用约束来确保容器视图填满整个屏幕,而不考虑屏幕的尺寸。

【讨论】:

  • 非常感谢,我错过了约束现在它正在工作:)
  • 没问题。我们都需要从某个地方开始! :)
猜你喜欢
  • 1970-01-01
  • 2016-07-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-12-08
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多