-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add flag to disable EpoxySwiftUIHostingController
keyboard avoidance
#170
Add flag to disable EpoxySwiftUIHostingController
keyboard avoidance
#170
Conversation
@@ -19,7 +19,7 @@ open class EpoxySwiftUIHostingController<Content: View>: UIHostingController<Con | |||
|
|||
/// Creates a `UIHostingController` that optionally ignores the `safeAreaInsets` when laying out | |||
/// its contained `RootView`. | |||
public convenience init(rootView: Content, ignoreSafeArea: Bool) { | |||
public convenience init(rootView: Content, ignoreSafeArea: Bool, ignoreKeyboardAvoidance: Bool) { |
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.
just realized both should be ignores
for consistency
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.
If we rename the API, it'll be a breaking change. That's fine but just something to keep in mind since it will change the semver
version when we tag another release off of master.
Head branch was pushed to by a user without write access
Change summary
This PR fixes an issue where an
EpoxySwiftUIHostingView
used as a bottom bar was being pushed above the keyboard when presented causing layout issues with the screen. There doesn't seem to be a way to disable this from SwiftUI (.ignoresSafeArea(.keyboard)
doesn't work) so this uses dynamic subclassing to override the hosting controller'skeyboardWillShowWithNotification
method.How was it tested?
How did you verify that this change accomplished what you expected? Add more detail as needed.
Pull request checklist
All items in this checklist must be completed before a pull request will be reviewed.
CollectionViewConfiguration
CHANGELOG.md
entry in the "Unreleased" section for any library changes