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 925 forks source link

Table view scrolling not respecting headers #21

Open jasonmarziani opened 11 years ago

jasonmarziani commented 11 years ago

I'm having an issue where TPKeyboardAvoidingTableView scrolls the textfield off screen. My table view uses static cells and has a header of 50px. It appears like if the scrolling accounted for the header, the textfield would be properly centered onscreen.

One solution would be to account for table header height (if that's not already in place, which it doesn't appear to be).

Another would be to expose a property that allows VC's to add an offset value to the scrolling, so that the parent view can adjust where the textfields land when selected.

jasonmarziani commented 11 years ago

On further review, looks like the header may not have been the issue, but instead the fact it's a Grouped table with two sections. When I remove the header, the cells still scroll above the screen. When the keyboard dismisses, I can no longer scroll beyond the first table section.

t2 commented 11 years ago

+1. I have a section header of 60px and the first UITextField scrolls underneath the header. Would be nice to have the ability to set a custom offset or as Jason said take header height into account.

jayjayesh commented 9 years ago

For my tableview with static 1 cell on each section, I am facing same issue, TPKeyboardAvoidingTableView scrolls on top when resign uitextfield.

have any one solve this issue ?