Search code examples
iosuitableviewuser-interfaceuiscrollviewuser-experience

How can I make the fixed cell at the bottom of the table view in iOS?


I would like to make a fixed cell at the bottom of the table view in iOS similar to that of leaderboard view of HQ trivia iOS app.

Like this:

Leaderboard HQ trivia, fixed view in red rectangle


Solution

  • To give the impression of a fixed cell, you can simply add a UITableView onto a regular UIViewController, set its constraints so that it consumes the whole view, but stops (for example) 60px from the bottom of the screen.

    Fill the remaining space with a UIView that has the same UI as the cell ... and thats it, the tableview will scroll, and the "cell" will always be visible at the bottom.