Reputation: 475
I have a view controller which has a tableview subview. I have made the tableview height smaller, leaving about 46 pixels for a button that needs to stay at the bottom and not scrolled with the table.
I have played around changing the height of the table view (in IB) and it doesn't seem to change anything. Any help would be appreciated.
Upvotes: 0
Views: 3271
Reputation: 15450
This can be done programmatically in the UITableViewDelegate:
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
{
// Build a custom view
// ...
// Build a custom button
// ...
[customFooterView addSubview:button];
return [customFooterView autorelease];
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
return 53.0; // return your button's height
}
Upvotes: 0
Reputation:
You need to have the UIButton at the same level as the UITableView - both are subviews of the main view. Do you have the UITableView as the view of the view controller?
Upvotes: 1