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

Wrong content offset with install option scrollToRevealFirstResponder #122

Open
nataliq opened this issue Sep 8, 2019 · 0 comments
Open

Comments

@nataliq
Copy link
Contributor

nataliq commented Sep 8, 2019

Expected Behavior

scrollToRevealFirstResponder is one of the default install options when using the methods in
UIViewController+Install.swift. When the first responder is visible the scroll view should not change its content offset.

Current Behavior

In certain situations the content will be visible but the method will change the offset of the scroll view to a negative value resulting in empty space on the screen and layout glitch.

Steps to Reproduce

TBD - I will push a branch with a test that reproduces it

Context

Basically if the view controller is in a navigation controller the calculation of the y-position of the visible rect is not correct and if the first responder is the first view on the top of the scroll view we might think that its not fully visible which results in not necessary content offset adjustment.

  • Operating Version: Reproducible on iOS 11+, works fine on iOS 10 (there is difference in the way content insets are propagated to scroll views)

Failure Logs

TBD - include a screenshot

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

No branches or pull requests

1 participant