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 layout issues on iPad pagesheets #244

Merged
merged 4 commits into from May 24, 2023
Merged

Conversation

Janneman84
Copy link

@Janneman84 Janneman84 commented May 23, 2023

What does this implement/fix? Explain your changes.

This fixes layout (gap) issues when keyboard appears on iPad when VC is presented as pagesheet of formsheet.

Does this close any currently open issues?

Closes #238

Any relevant logs, error output, etc?

none

Any other comments?

The fixes are a bit hacky but it's the only way I could find that works.

Where has this been tested?

Devices/Simulators:
iPad with and without home button, landscape and portrait (important). Also tested on various iPhones to make sure it kept working fine there too.

iOS Version:
14/15/16

Swift Version:
the one used by Xcode 14.3

InputBarAccessoryView Version:
6.2.0

@Kaspik Kaspik changed the title fixes layout issues on iPad pagesheets (issue #238) Fix layout issues on iPad pagesheets May 23, 2023
@Janneman84
Copy link
Author

I pushed some tweaks to the master branche. Can you see it?

The reason for starting the animation a second time inside dispatchqueue is because on iPad in portrait when the keyboard slides in the pagesheet will move up a little too. So you need to wait a cycle to get te correct compensation value or else you'll still have a gap.

@Kaspik
Copy link
Collaborator

Kaspik commented May 23, 2023

Add info to the Changelog please. :)

- code optimizations
@Janneman84
Copy link
Author

Janneman84 commented May 24, 2023

I added a line to the changelog.

I also did some code optimizations to prevent unnecessary calling of animateAlongside(). Works fine as far as I tested :P.

Oh and turned out I made a stupid mistake in the process which I fixed. Sorry for the confusion.

@Kaspik Kaspik merged commit 152b4fa into nathantannar4:master May 24, 2023
2 checks passed
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.

Layout issues on iPad when using pagesheets
2 participants