UITableView tableFooterView weird resizing
I want to display a UIButton in a UITableView's Footer (should be exactly the same for the header). This code is in the viewDidLoad of my TableViewController: UIButton *footerShareButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [footerShareButton setFrame:CGRectMake(10, 0, 70, 50)]; NSLog(@"%f", footerShareButton.frame.size.width); [self.tableView setTableFooterView:footerShareButton]; NSLog(@"%f", footerShareButton.frame.size.width); NSLog(@"%f", self.tableView.tableFooterView.frame.size.width); However, this code doesn't work. The Button's width is much too large, it's 320. (The