我有一个 View Controller , View Controller 的 UI 通过 xib 文件而不是 main.storyboard 表示。这是它的样子。如您所见,我有一个 UIImage View 充当背景图像,并且应该覆盖整个屏幕。
我正在尝试添加四个约束:使所有四个到最近邻居的间距都等于 0。但是当我使用 pin constraint 选项并将 pin all sides 设置为 0 时,它不会使到最近邻居的间距零但给了我以下四个约束:
然后我尝试控制从 uiimage 到框架边缘的拖动,但我也做不到。我该如何解决这个问题?
还忘了提一件重要的事情。当我运行该应用程序时,屏幕顶部和底部有黑色区域。所以 UIImage 不会覆盖整个屏幕。这是应用程序运行时的图片:
最佳答案
您的问题是启动屏幕。
You need to check the launchscreen ,if it is not in correct format or there is no launchscreen means this kind of problem will occurs .
关于ios - 为所有设备屏幕设置UIImage覆盖屏幕,xib文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36453501/