Unable to resize view in xcode

前端 未结 3 685
感情败类
感情败类 2021-01-24 07:00

I can\'t seem to resize my view to fill the screen in the simulator (see screenshot below - notice the top and bottom black lines) does anyone know how i fix this?

相关标签:
3条回答
  • 2021-01-24 07:28

    One common reason for this sort of letterboxing is that your app project lacks launch images for all device sizes. An easy way to get past that hurdle is to use a LaunchScreen.storyboard. Make a completely new project in a modern version of Xcode, and you will see that it has a LaunchScreen.storyboard for this very reason.

    0 讨论(0)
  • 2021-01-24 07:29

    Please use the AutoLayout and set the Top and Bottom of your view to have zero distance w.r.t the Top Layout and Bottom Layout. Similarly also set the X coordinate of your view using the Autolayout.

    Thanks

    0 讨论(0)
  • 2021-01-24 07:45

    The reason of this issue is you have not added launch images or storyboard in your project.

    You either need to add launch images to your xcasset folder or you need to create storyboard for launch.

    This is not the issue with auto layout.

    0 讨论(0)
提交回复
热议问题