ios - Why the view's margin has to be -20 to get it close to the end of the screen, why not zero? -


screenshot:

constraints -20

see, leading, trailing , top -20, it's supposed 0.

basically, want view reach end of left, right , top side.

in order achieve this, it's supposed 0 in practice, have give -20 achieve that.

i think has top , bottom layout guides, don't know is.

can me, please?

you set constraints according margin of actual superview, main view of view controller. avoid doing that, hold down option while dragging constraints, menu...

constraints margins

becomes this:

constraints without margins

if created constraint, click on , select size inspector (the fifth menu on right). check properties of first , second item , unselect relative margin in both.

size inspector settings


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -