views:

173

answers:

1

A little background:

My app is designed as a web form in a UITableView. It is similar in format to the iPhone's Settings > Mail,Contacts,Calendars > "Account Name" > Account Info. A few differences: 1) I have a big text box on the bottom where you can put a "message body". 2) I have a big red button underneath the text box, similar to the red "Delete Account" button at Settings > Mail,Contacts,Calendars > "Account Name". the red button button submits the "form".

The view described above fits in a 320 width by 416 height view (in other words, there is no need to scroll in portrait mode including a Nav Bar)

The issue:

When I rotate to landscape, the UITableView cannot scroll to view the entire 416 height. Im stuck at 268 by 480 ( plus nav bar) and the bottom part of the table (part of the text box and the red button) are cut off and hidden below. If you use the scroll "spring-back" you can temporarily see the rest of the view, until you let go.

Other design details

  • Im using UIViewController and adding the UITableView to the view
  • I'm using:

    self.tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth;

  • I tried forcing both the view and table to have height of 416 before (viewDidLoad) and after (via notification) rotation. Still can't scroll the UITableView

Does anyone have any suggestions as to what the issue might be or what else to try?

A: 

Have you tried this (you'll also want to remove the bit about forcing the height of the view and the table):

self.tableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
No Surprises
Ok so if i set it like this (flexible width and height) i can scroll the entire table but the button at the bottom is still hidden ( i cant scroll to that). I assume that this is because when the auto resizing calculations occur the button is not part of the table therefore not considered in the resize. I now need some way to indicate that there is that space below the table (which really contains a button) to be part of the resize.
phife757
Have you tried putting the button in the footer of the last section of your UITableView? Like this: http://blog.blackwhale.at/2009/07/uibutton-in-uitableview-footer/. That should make it so that your button scrolls into view even after the table is resized.
No Surprises