-
Notifications
You must be signed in to change notification settings - Fork 13
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
Additional modal presentation styles #61
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks!
case pageSheet | ||
case formSheet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hate to come in late after a merge, but I think these should be:
case pageSheet = "page_sheet"
case formSheet = "form_sheet"
to match Navigation.Presentation.clearAll
and Navigation.Presentation.replaceRoot
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in PR #63.
This PR adds two modal styles: page sheet and form sheet. These styles differ in presentation only on iPads. On iPhones, they fallback to the same behavior:
• In portrait mode, the system displays the view controller as a sheet, with part of the background content visible near the top of the screen.
• In landscape mode, the behavior is identical to full screen presentation.
Additionally, this PR also adds the option to disable the pull-down gesture for the page and form sheet presentations. This is particularly important on iPads, where all it takes is an accidental tap outside of the sheet to dismiss it.
You can specify the behaviour by adding
modal_sheet_dismiss_gesture_enabled
to the path config. If omitted, the default valuetrue
is used, which matches the default OS behaviour.