Flexible iOS Auto Layout Fields

I am trying to create a layout that contains flexible vertical margins between specific static-height elements in Interface Builder . Since I have no idea how I can determine this, I tried using "spacer" views with flexible heights. The layout I created in Interface Builder looks like this:

Layout in IB

Blue rectangles are static heights, and their height should not change . But their margins and the gaps between them should vary depending on the size of the screen. Red rectangles are intermediate views and should be of a clear color, but I left them red, only for testing purposes.

. , , , , - , . , .

Springs and struts

, API . . , . :

Autolayout in storyboard

. 4- , 3,5- :

Autolayout on iPhone 4

, , -, 0, . ( ).

, , ?

? , , ?

!

0

Source: https://habr.com/ru/post/1534157/


All Articles