本文介绍了如何在不使用TableViewController的情况下创建分组的TableView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我有一个UITableView,我希望它有2个部分。我现在知道,如果你使用的是UITableViewController,并且你使用的是静态单元,那么你只能分组。这是我想做的吗?如果是这样,我可以在哪里寻求帮助来设置它。似乎我发现的每个教程都是使用UITableViewController的例子。

I have a UITableView and I would like it to have 2 sections. I now know that you can only have grouped sections if you're using a UITableViewController and if you're using static cells, neither of which I am. Is that I want to do possible? If so where can I turn for help on setting this up. It seems like every tutorial I have found is for the example of using a UITableViewController.

推荐答案

设置tableView的属性到 .Grouped 并从 numberOfSections返回 2 ... -method应该会产生良好的结果。这种标准方法在哪里失败?

Setting the tableView's style property to .Grouped and return 2 from numberOfSections...-method should yield a good result. Where does this standard approach fail?

这篇关于如何在不使用TableViewController的情况下创建分组的TableView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 18:44