ios - Aligning Elements in Xcode -


i seem having trouble aligning elements. want uitextfield center horizontally, , stay towards top of app.

this looks on storyboard:

enter image description here

as can see, there constraints set - blue lines (i think means correct)

however when view in simulator:

enter image description here

these settings in xcode pin popup:

enter image description here

question:

how uitextfield stay center horizontally, regardless of device or orientation?

edit 1:

i took out constraints, made uilabel full width of view, , centered text inside. assumed make center, alas not.

storyboard: enter image description here

simulator: enter image description here

edit 2:

enter image description here

see 2 red squares, i'm not sure how change text. there no options on edit.

i cant see how add other constraints suggested.

enter image description here remove left , right constraints , set following one.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -