Leffison
Leffison

Reputation: 61

Having trouble with Xcode Autolayout

That is what program look like in portrait,and it work pretty well. That is what program look like in portrait,and it work pretty well.

That is what it look like when I rotate. That is what it look like when I rotate.

It's really odd. I did add constraint to the top, but when I rotated the device even the "battery bar",I suppose it's named like this, went away!!

It's really odd. I did add constraint to the top, but when I rotated the device even the "battery bar",I suppose it's named like this, went away!!

Plz, could someone tell me did I miss anything? Or what can probably change the position of "battery bar".

(After solving the problem: I find out that when user rotate the device the "battery bar" are suppose to be disappear. And there is way to keep it from disappearing as the asking given below. I find a way to debug my view by watching "Debugging in Xcode 6" in 2014WWDC. 2014WWDC )

Upvotes: 0

Views: 53

Answers (2)

OverD
OverD

Reputation: 2632

do you have a constraint for the label as well? i think the best way to do it is setup the constraints for the label to top margin, and constraint the keypad with equal distance to the label.

Upvotes: 0

user821127
user821127

Reputation:

You need to add label to View and embed buttons in UIVIew from Editor>EmbedIn>View. Make View with buttons subView center Horizontally and Vertically.

enter image description here

Upvotes: 1

Related Questions