Storyboard preview differs from simulator

I am currently trying to deal with limitations (using Xcode 6 GM seeds). Using reset for the proposed restrictions, everything looks right in the universal storyboard and in the preview: storyboard

storyboard previews

As you can see, I am viewing several screens. All of them have an image of a point (and the image itself occupies the entire view set for drawing in the center) in the center. However, when I upload it to the simulator, I see:

simulator

I am not sure why this is happening. As far as I can tell, the limitations are all what they should be:

constraints

constraint_1constraint_2constraint_3constraint_4

Is there something I am doing? Or is there an error here in xcode 6?

Thanks in advance!

+5
source share
2 answers

You do not need to add restrictions Leading, trailing and vertical space. To place a point in the center, you need to add the horizontal and vertical center in the container. Place your point in the center of the controller and add these two, as in this image. enter image description here

+1
source

The "Preview" storyboard does not match the simulator if you have any errors / conflicts restrictions. I had this problem and I found this question looking for an answer. One of them resolved all conflicts, Preview worked. It still seems that the preview should constantly show what the simulator will show during setup.

0
source

Source: https://habr.com/ru/post/1202216/


All Articles