views:

62

answers:

1

I have added a custom footer to a tableview using viewForFooterInSection I display a alertprompt where I get user input via a UITextField so the keyboard appears but when I press OK and the screen refreshes (via statement[self.tableView reloadData];) my footer is displaying ABOVE where the keyboard used to be so displaying in the middle of my tableview instead of at the bottom of the screen.

How do I get the keyboard to disappear BEFORE the footer redraws so I don't have the footer in the middle of the screen??

A: 

According to Text and Web Programming for iPhone OS: Managing the Keyboard: Moving Content That Is Located Under the Keyboard:

Note: As of iOS 3.0, the UITableViewController class automatically resizes and repositions its table view when there is in-line editing of text fields. See “View Controllers and Navigation-Based Applications” in Table View Programming Guide for iOS.

It sounds like the table view responds to the keyboard appearing/disappearing regardless of whether the text field is inside the table view. File a bug. If you make your own UIViewController subclass which manages its own table view, you can probably work around the bug.

You're also slightly misled: reloadData doesn't "redraw the footer".

tc.