Skip to content

Latest commit

 

History

History
28 lines (15 loc) · 1.18 KB

README.md

File metadata and controls

28 lines (15 loc) · 1.18 KB

LayoutMarginsDemo

This project demonstrates UIKit's layout margins in action.

Created by Marina Gornostaeva for Detail-oriented UI with Layout Margins talk @ NSSpain 2019.

Recording: Vimeo | Slides: SpeakerDeck

About the project

Layout margin propagation is a really powerful thing. Try it out yourself!

A simple gesture recognizer changes the frame of the red view, showing how margins change when the subview is positioned close to the edge of its parent.

This behaviour can be enabled by setting preservesSuperviewLayoutMargins to true on your views.

The demo

Requirements: Xcode 11, iOS 9.0+

More