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

13836932: UIScrollView Should Not Adjust Content Inset if it is Input View #5016

Open
openradar-mirror opened this issue Aug 13, 2015 · 0 comments

Comments

@openradar-mirror
Copy link

Description

Summary:

You can set a view as inputView for a editable view to appear in place of a keyboard. If this inputView has a scroll view this will erroneously receive a setContentInset after the keyboard finished its incoming animation.

Steps to Reproduce:

  • Create a UITableViewController
  • On a UIView that canBecomeFirstResponder set this VC's view as inputView
  • have the UIView becomeFirstResponder

Expected Results:

  • The UITableViewController's tableView should not have a contentInset

Actual Results:

  • Every UIScrollView receives a contentInset, even if it is itself the inputView that was showing "as keyboard".

Regression:

  • This automatic setting of contentInset started with iOS 6. It does not occur in iOS 5.

Notes:

I believe that the notification that gets sent after the keyboard/inputView animated in should take into consideration that scroll views that are subviews of the showing inputView don't get a contentInset set.

As a workaround I am subclassing UITableView and overriding setContentInset: to ignore the erroneous setting.

This is the call stack I get on this overwritten contentInset:

At first glance I assume that you would want to modify _adjustForAutomaticKeyboardInfo:animated:lastAdjustment: to check if the UITableViewController's view is part of the view hierarchy of the inputView that triggered the inputView frame size change notification.

Product Version: 6.1.3
Created: 2013-05-08T11:13:39.055560
Originated: 2013-05-08T13:13:00
Open Radar Link: http://www.openradar.me/13836932

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant