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

Fix bottom gap calculations for embedded controllers #263

Merged
merged 4 commits into from
Jul 11, 2024
Merged

Conversation

Kaspik
Copy link
Collaborator

@Kaspik Kaspik commented Jul 11, 2024

@Kaspik Kaspik merged commit 093bdc7 into master Jul 11, 2024
2 checks passed
@Kaspik Kaspik deleted the bottomGapFix branch July 11, 2024 18:28
@Janneman84
Copy link

Janneman84 commented Sep 15, 2024

Unfortunately this fix actually broke the positioning. I did some testing and I believe I found a way that works well in all cases. At least it works well for all examples in the MessageKit example app when presented as pagesheet on iPad, as well as side view mode.

For bottomGap you changed:
return window.frame.height - superView.convert(superView.frame, to: window).maxY

to:
return window.frame.height - window.convert(superView.frame, to: window).maxY

but try this instead:
return window.frame.height - superView.convert(superView.bounds, to: window).maxY

So basically change frame with bounds.

Can you give this a try and confirm this works for your use case as well?

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.

A layout issue on the ipad in the side window mode.
2 participants