Search code examples
iosiphonexcodeswiftxcode-storyboard

ViewController shows up empty in iOS Simulator swift


When I run my current xcode project, with the screens shown below in image 1, it shows up empty as seen in image 2. The project was started as a single view application. I added the items shown on the screen and created a segue to the second screen based on the button press "Add".

When I run this, you can see the outcome in image 2.

The code I have in the viewDidLoad() is running and doing as expected. However, unsure of why the screens show up blank...

storyboard

enter image description here


Solution

  • Things to observe before you change anything. Launch your app and change orientation to Landscape. You will have something like this.App in landscape orientation

    This is because you have set your storyboard to wCompact hCompact.

    Change it to wAny hAny. But before doing that remove the tabbar from wCompact hCompact setting. and add it after changing to wAny hAny