Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow adjustment for safe area insets #29

Merged
merged 2 commits into from
Sep 12, 2019

Conversation

tbrushwyler
Copy link
Contributor

This PR addresses Issue #4, allowing adjustments based on the safe area insets. This expands on the default implementation provided for iOS devices, allowing more elements to be adjusted than just the page.

One use case is a ScrollView with content taller than the page. Instead of adding padding to the ScrollView's container (page), we can add the padding to the ScrollView itself. This gives a more natural look and feel to the page.

Android handles cutouts differently, so we don't need to do anything special.

Screen Shot 2019-09-06 at 2 01 58 PM

@tbrushwyler
Copy link
Contributor Author

To use these values, you can either reference an inset directly (e.g. Double_SafeAreaInset_L) or reference a thickness with a combination of the insets (e.g. Thickness_SafeAreaInsets_T, Thickness_SafeAreaInsets_H, Thickness_SafeAreaInsets_LRB).

@stackunderflows stackunderflows merged commit 9621159 into develop Sep 12, 2019
@stackunderflows stackunderflows deleted the feature/safe-area-padding branch September 12, 2019 13:04
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.

2 participants