Search code examples
iosxcodelayoutxcode-storyboard

Storyboards not showing correct layout on iOS application


I am trying to make my own iOS application for the iPhone 5, I have added 3 labels and one button, problem is one button shows up, however the one of the other buttons and the label are cropped ever so slightly and the last button is out of sight.

I know this is to make it so developers only need to design one GUI for all devices, however I don't know how to fix this.

Example error:

StoryBoard Design

enter image description here

Running on iPhone 5 simulator

enter image description here

How would I fix this?


Solution

  • As you said in your question that you are making an app for iPhone5. So,you have to change your view controller screen size in attribute inspector.

    1. select your view controller and change size

    enter image description here

    2. Now your view controller looks like this

    enter image description here

    Now run project in iPhone 5 simulator.