IQKeyboardManager: Does not scroll when clicking on textfield that will be behind keyboard

This is how it looks like at the start:screen shot 2017-01-09 at 6 08 41 pm

If I click on the 1st textfield and press tab/arrow next then it works:screen shot 2017-01-09 at 6 08 58 pm

If I click on the 3rd textfield, it doesn’t care for some reason: screen shot 2017-01-09 at 6 09 07 pm

Any idea why? The only thing I did was I made the UIView a UIScrollView instead, so that the whole UINavigationController doesn’t scroll up. So this is the format: Topmost UIView -> UIView -> UIScrollView -> UITextFields

I have not tested it on Simulator iOS 10 or on an actual device yet, though I expect them to behave the same.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 21 (9 by maintainers)

Most upvoted comments

Hello @CyberMew I checked the project and I found that it’s because you changed UIView class to UIScrollView. If you need scrollView then drag and drop a UIScrollView to storyboard (don’t change UIView class to UIScrollView).

The thing is that your scrollView doesn’t have correct contentSize and you are not getting any layout errors in storyboard because storyboard considering that view as UIView and it was ok for UIView, but for UIScrollView the constraints are wrong.

Hope you’ll fix it soon.