I have a UITableView as a subview in a ScrollView with other widgets around like a button. I'd like to put the button always at the end of the ScrollView and I'd like to have the UITableView to show dynamically more section. How and where shall I determine the Table size, correctly set it and visualize it? From Interface Builder it seems that I can only set static size to the TableView (which of course limits the number of sections visible) and stick the button position to the bottom whether a rotation happens.
+2
A:
If you have only few simple controls after the table then I'd suggest putting them to the table itself and get rid of the unhealthy (in my opinion) combination of table view inside scroll view.
You might add the button you are talking about to the table's footer.
It may be done in the Interface Builder (drag-n-drop the button to the bottom of the table view) or in the code ([tableView setTableFooterView:myButton];
).
If your button should be smaller that table's width then put it inside UIView and locate as you need.
You can also add table header in a similar way...
Michael Kessler
2010-07-18 17:19:33
Ty I followed your suggestion and it seems that I can reach the result I had in mind, having also a more polished code, thanks.
rano
2010-07-18 17:48:27