Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有tableView数百个细胞。我想添加一个功能来固定到最喜欢的单元格,例如通过滑动。有没有办法做到这一点?还是更容易tableView与最喜欢的单元格不同?
tableView
本节。
添加您的收藏夹以查看,您可以使用情节提要或使用以下代码以编程方式创建它。如果您使用故事板,请创建并引用 tableViewController 并返回此代码。
override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { // create and return yourView }