Add a footer to the UITableView at the bottom

I am making a slide menu using UITableView, and I have 2 options in the menu, and I want to put the button at the bottom, as in this image:

enter image description here

I am trying to do so to add tableFooterView.

UIView *footerView  = [[UIView alloc] initWithFrame:CGRectMake(0, 500, 320, 70)];
footerView.backgroundColor = [UIColor blackColor];
self.tableView.tableFooterView = footerView;

However, the view appears immediately after the second cell, but I want it below.

Thanks for the help.

+5
source share
3 answers

, UITableViewCell , UITableView UITableView. , UITableView , , , , UITableView , UITableView

, "" ( , ).

0

, , . , , layoutSubviews tableView footerView.

- (void)layoutSubviews
{
   [super layoutSubviews];
   self.tableView.frame = // top 80% of the screen
   self.footerView.frame = // bottom 20% of the screen
}
+8

. .

0
source

All Articles