user1419810
user1419810

Reputation: 846

Unable to resize view in xcode

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?

enter image description here

Thanks,

Matt

Upvotes: 1

Views: 418

Answers (3)

Rajat
Rajat

Reputation: 11127

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.

Upvotes: 1

matt
matt

Reputation: 536027

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.

Upvotes: 1

Meticulous007
Meticulous007

Reputation: 24

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

Upvotes: 0

Related Questions