Skip to content

Conversation

@alexbredy
Copy link
Contributor

@alexbredy alexbredy commented Feb 1, 2019

This pull request adds the ability to AloeStackView to adapt its insets to the superview's layout margins.

Motivations:

  • Avoid to explicitly set the default margin when we want to inherit from the superview margins
  • Automatic support for universal apps (iPhone and iPad can have different layout margins)

An example ViewController has been added to showcase this. The screenshot below comes from that VC. The default insets are set to 0. The existing margin is the one that the superview defines.

Most of the lines in this PR are related to the example. The actual trick is done by overriding the preservesSuperviewLayoutMargins property of AloeStackView/UIScrollView.

@larryonoff
Copy link

This's really useful request. Could anyone with write access review it?

alexbredy and others added 2 commits June 3, 2019 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants