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

UIScrollView & adjust offset #38

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Marcaux
Copy link

@Marcaux Marcaux commented Oct 26, 2017

Using scrollRectToVisible:animated: seems to cause some problems to adjust scrollview offset with the keyboard. Could this solution be suitable?

…djust scrollview offset with the keyboard.
@defagos
Copy link
Owner

defagos commented Nov 14, 2017

Thanks for your PR that I could test.

The behavior does not match the initial expected behavior. If a field is already in view when entering edit mode, no scrolling should occur. With your implementation, as soon as you tap on a field, it immediately jumps right above the keyboard, which is annoying from a user point of view.

This is also not perfectly consistent, as this offset can be changed afterwards when the user scrolls:

  1. Tap on the first field. The fields jumps at the bottom, just above the keyboard.
  2. Just slightly grab the parent scroll view. The field jumps at another position.

Could you please recall me what your exact issue with -scrollRectToVisible:animated: was?

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.

2 participants