Skip to content
UIKit's layout margins in action for NSSpain 2019
Swift
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LayoutMarginsDemo.xcodeproj
LayoutMarginsDemo
LayoutMarginsDemoTests
.gitignore
LICENSE
README.md
demo.gif

README.md

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

You can’t perform that action at this time.