IOS Simulator button is not centered

I am following a tutorial to make a very simple game, but I ran into a problem that I cannot understand. When I focus my button on the editor screen, everything looks great, but then running the application in the simulator seems to overshadow everything:

problem

I am running the latest version of Xcode.

+1
source share
2 answers

You need to use autorun to set some restrictions on the button. If you do not use autostart, the layout uses only the initial values ​​of X and Y. Therefore, in the landscape, the screen heights are the same, but the width is different. Your button is on the same X value on both screens, so you will be centered and one will not.

.

+5

. Xcode 6 ( Xcode 7) .

, XIB. Xcode 6 ( Xcode 7).

. . Main.storyboard , , , :

enter image description here

. . " " " ". " 2 ".

enter image description here

, , , . " ", . " " " ".

enter image description here

, , , .

- . .

+3

All Articles