UIButton under grouped table
Basically, I want to create a button underneath a grouped table view like contacts.app to delete contacts.
I can create the button ok, I'm a bit confused as to how to decide where to place it.
I thought I could just do:
CGRect bounds = [[self tableView] bounds];
Then place a button based on that.
However, when accessing the size.height of the bounds, I get null! Is there a dynamic way to get the height of the tableView that I might lose?
Any help is greatly appreciated.
Rich
+2
source to share
3 answers
You can try to create a custom footer with the buttons that were placed in this view by implementing these methods:
- (CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
- (UIView *) tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
This will allow you to place any number of buttons in the table below the section you want.
+1
source to share