Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Puzzled with auto layout

dickthedevdickthedev Posts: 208 @ @
edited May 8 in iOS SDK Development
Hello, I am learning to use auto layout in storyboard. Xcode 8.3.2
I started with iPhone 7, put an square 50x50 UIView at the dead center, it looks just right.
But once I rotated it to landscape, it is completely off. I was expecting to see the square remains in dead center. The same layout, I switched to iPhone 5, even in portrait mode, it is completely off again, and also I was expecting to see the square remains in dead center. What have I done wrong?
And btw, how do I detect the orientation in real time when the user rotates the device?
Thanks.
Post edited by dickthedev on
7.png 12.6K
5.png 10.6K

Replies

Sign In or Register to comment.