I have a UITableView with a tall header, many cells, and a footer. I add my footer through the storyboard: this makes it easy for me to create IBAction to buttons inside my footer. The problem is that my footer is not floating. I need the footer to float at the bottom of the screen (except when the keyboard is showing, then I want it to show right above the keyboard). Right now my footer is the very last cell in my table, so that when there are many cells, the footer is offscreen. How do I fix my code so that the footer is aways floating at the bottom of the screen?
Asked
Active
Viewed 743 times
2
-
switch to `UITableViewStylePlain` style. check [answer](http://stackoverflow.com/a/25649789/2857130) for quick reference regarding the `tableView` style – staticVoidMan Sep 06 '14 at 18:57
-
my style is plain. I never changed it in the Attributes Inspector – Katedral Pillon Sep 06 '14 at 19:00
-
then it should float. it floats here, hm... – staticVoidMan Sep 06 '14 at 19:01
-
oh, wait a sec, you said you added it via the storyboard. it seems you have added a `tableView` footer and not a section footer. implement the `-titleForFooterInSection:` or `-viewForFooterInSection:` delegate method and that should float. – staticVoidMan Sep 06 '14 at 19:02
-
May be this topic will help you http://stackoverflow.com/questions/18047720/uitableview-make-footer-stay-at-bottom-of-screen – Ivan Vavilov Sep 06 '14 at 19:03
-
I did that (and its the current version of my code), but the problem now is that when the keyboard shows up, it hides the textField that is inside my "footer", as the footer does not move. – Katedral Pillon Sep 06 '14 at 19:06
-
now that, my dear friend, is not ready made. What you can do is shift the `tableView` frame up by the keyboard height. once again... something along these lines: [answer](http://stackoverflow.com/a/19678064/2857130) – staticVoidMan Sep 06 '14 at 19:12