如何在Swift中的TableView中固定到顶部?

问题描述 投票:0回答:1

我有一个有数百个细胞的tableView。我想添加一个功能来固定最喜欢的单元格,例如通过滑动。有没有办法做到这一点?或者更容易与最喜欢的细胞有不同的tableView

ios swift tableview cell favorite
1个回答
0
投票

部分为此。

添加您的收藏夹进行查看,您可以使用故事板或使用以下代码以编程方式创建它。如果您使用storyboard,请创建并引用tableViewController并返回此代码。

override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView?
{
   // create and return yourView
}
© www.soinside.com 2019 - 2024. All rights reserved.