VaultDesign
VaultDesign

Reputation: 43

Swift Storyboard Auto Size Classes

i have a problem. I had a storyboard in Xcode 6 with the inferred size of the view controller and the "Use Auto layout" option checked. Today i wanted to use the new " Use Size Classes" option. I checked the option and then in the simulator the screen was all black!

EDIT

now that i resolved this issue i have another thing here ! I use "Add missing costraints" option to have a resize for all Apple Device, the Tab bar and navigation bar are good, but then all the buttons ( they have an image ) are in different position !

How i can resolve that ? Thanks in advance.

Upvotes: 0

Views: 175

Answers (3)

Hugo Alonso
Hugo Alonso

Reputation: 6824

You should avoid as possible the use of "add missing constrains". Is an automatic tool that almost always ends up adding unnecessary constrains or breaking others.

If you want something to look really good an stable, sadly there are no shortcuts... you will eventually end having to do it all by yourself.

Upvotes: 0

Hugo Alonso
Hugo Alonso

Reputation: 6824

A black view.. if not always, is a good indicative that the view is not loaded. Size Classes introduces a new concept ...You can have several views that will be installed or not into your view depending of your view configuration. More details on images below:

This is what you will be looking for:

enter image description here

This is what I call view rendering configuration (sure Apple has another name for it). It is located at center bottom of your storyboard view.

enter image description here

This is always located at the end of Attributes Inspector tab:

enter image description here

Make sure it is enabled for the view that suits your testing device.

Upvotes: 1

VaultDesign
VaultDesign

Reputation: 43

I found out that the ViewController wasn't set as Initial Controller.

Upvotes: 0

Related Questions