Tablefooterview Property Doesn't Fix the Footer at the Bottom of the Table View

tableFooterView property doesn't fix the footer at the bottom of the table view

Since your goal is to have a footer that stays fixed at the bottom of the screen, and not scroll with the table, then you can't use a table view footer. In fact, you can't even use a UITableViewController.

You must implement your view controller as a UIViewController. Then you add your own table view as a subview. You also add your footer as a subview of the view controller's view, not the table view. Make sure you size the table view so its bottom is at the top of the footer view.

You will need to make your view controller conform to the UITableViewDataSource and UITableViewDelegate protocols and hook everything up to replicate the functionality of UITableViewController.

Custom UITableView Footer doesn't lock in the bottom as the table view is scrolled

Unfortunately thats not how table section footers work. In order to accomplish an anchored view at the bottom you will need to add it as a subview to your UIView manually.

If you add it as a subview to your UITableView you will need to keep it anchored by changing its frame in scrollViewDidSroll:. If you add it as a subview to the UIView containing your UITableView you can just place it statically at the bottom. In either case you probably want to adjust the contentInset of the table view with an inset at the bottom so that you can scroll your content up above the anchored footer.

UITableView Footer, Stop from floating over content

Ok, it turns out that if you set the footer view via blahblahtableView.tableFooterView = someview; , the footer will not scroll with the table.

However, if you create your footer using viewForFooterInSection, it WILL follow your view around and stick on the bottom of the screen.

Not sure why I couldn't find this answer sooner. Sorry all :)

UITableView's tableFooterView being displayed in very strange ways

This is the ugly, hacky solution, so far.

The footerView and the UITableView have their bottoms aligned, and I connect that constraint to the .m file as a property (bottomToBottomConstraint). I then set myTableView.contentSize.height to be the bottomToBottomConstraint.constant, and the view appears where I want it to be.

    self.bottomToBottomConstraint.constant = self.myTableView.contentSize.height;

While it is just one line of code, I would prefer understanding the problem and implementing a true solution... awaiting your knowledge!

Tableview footer not show

You forgot to set the frame of your footerView



Remove all the first part of your code and use this:

func tableView(tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView(frame: CGRectMake(0, 0, tableView.bounds.size.width, 20))
}

func tableView(tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 20
}


Related Topics



Leave a reply



Submit