如何在 iOS 的表格视图底部制作固定单元格? [英] How can I make the fixed cell at the bottom of the table view in iOS?
问题描述
我想在 iOS 中的表格视图底部制作一个固定单元格,类似于 HQ trivia 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.
像这样:
推荐答案
为了给人一种固定单元格的印象,你可以简单地添加一个 UITableView
到一个常规的 UIViewController
, 设置其约束,使其消耗整个视图,但停止(例如)距屏幕底部 60px 的位置.
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.
用与单元格具有相同 UI 的 UIView
填充剩余空间......就是这样,tableview 将滚动,并且单元格"将始终在底部可见.
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.
这篇关于如何在 iOS 的表格视图底部制作固定单元格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!