michaeltyson / TPKeyboardAvoiding

A drop-in universal solution for moving text fields out of the way of the keyboard in iOS
http://atastypixel.com/blog/a-drop-in-universal-solution-for-moving-text-fields-out-of-the-way-of-the-keyboard/
zlib License
5.81k stars 926 forks source link

Fix content insets not always being updated for QuickType bar #279

Closed swoolcock closed 5 years ago

swoolcock commented 5 years ago

Fixes an issue where scrolling to the next field would not update the content insets to include the QuickType bar if it appears. This was brought about by the iOS 9 ignoringNotifications workaround.

Example:

1) Select a UITextField with no autocorrect/QuickType displayed. 2) Select another UITextField with QuickType displayed. 3) contentInsets are not updated, so anything at the bottom of the content view will be covered by the QuickType bar.

The implemented solution is to only check ignoringNotifications if the begin and end keyboard frames are the same.

michaeltyson commented 5 years ago

Thank you! Nice work!