TPKeyboardAvoiding icon indicating copy to clipboard operation
TPKeyboardAvoiding copied to clipboard

Table view scrolling not respecting headers

Open jasonmarziani opened this issue 12 years ago • 3 comments

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 avatar Mar 01 '13 17:03 jasonmarziani

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.

jasonmarziani avatar Mar 01 '13 18:03 jasonmarziani

+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.

t2 avatar Aug 16 '13 03:08 t2

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 ?

jayjayesh avatar Jun 18 '15 13:06 jayjayesh