这些是 table 观看次数吗?
Are these table views?
我想显示一些与可编辑的对象相关的数据(例如,对象是菜谱或联系人)。
我想像这样显示对象数据(见下图),但我想知道是否应该使用 Table 视图。
下面的详细信息视图是否使用 Table 视图来显示其数据?
感谢您帮我解决问题![=13=]
您看到的是 分组 UITableViews
。正如您在上面看到的那样,将它们分开。一般在IB的attributes inspector下style下选择这个设置。
Objective-C:
UITableView *tv = [[UITableView alloc] initWithFrame:frame style:UITableViewStyleGrouped];
Swift:
let tv:UITableView = UITableView(frame: frame, style: .Grouped)
界面生成器:
更多信息:
这些类型的 table 视图的内在挑战是数据没有牢固的关系。例如,在一个普通的 table 视图中,所有的单元格通常都是从一个数据源驱动的(即像 Post 模型或类似的东西)。有了这些,它就像 "Rate App" 或 "Visit Us Online",它们不相似。
出于这个原因,在设置这种 table 视图时,我建议看一下这个 github,这会减轻一些痛苦:https://github.com/romaonthego/RETableViewManager
简单的回答是是他们是UITableView
。它们是带有 UITableViewStyle
UITableViewStyleGrouped
的 UITableView
或 swift 只是 Grouped
.
您可以通过以下操作轻松创建其中之一的实例:
Objective-C
UITableView *groupedTableView = [[UITableView alloc] initWithFrame:frame
style:UITableViewStyleGrouped];
我想显示一些与可编辑的对象相关的数据(例如,对象是菜谱或联系人)。
我想像这样显示对象数据(见下图),但我想知道是否应该使用 Table 视图。 下面的详细信息视图是否使用 Table 视图来显示其数据?
感谢您帮我解决问题![=13=]
您看到的是 分组 UITableViews
。正如您在上面看到的那样,将它们分开。一般在IB的attributes inspector下style下选择这个设置。
Objective-C:
UITableView *tv = [[UITableView alloc] initWithFrame:frame style:UITableViewStyleGrouped];
Swift:
let tv:UITableView = UITableView(frame: frame, style: .Grouped)
界面生成器:
更多信息:
这些类型的 table 视图的内在挑战是数据没有牢固的关系。例如,在一个普通的 table 视图中,所有的单元格通常都是从一个数据源驱动的(即像 Post 模型或类似的东西)。有了这些,它就像 "Rate App" 或 "Visit Us Online",它们不相似。
出于这个原因,在设置这种 table 视图时,我建议看一下这个 github,这会减轻一些痛苦:https://github.com/romaonthego/RETableViewManager
简单的回答是是他们是UITableView
。它们是带有 UITableViewStyle
UITableViewStyleGrouped
的 UITableView
或 swift 只是 Grouped
.
您可以通过以下操作轻松创建其中之一的实例:
Objective-C
UITableView *groupedTableView = [[UITableView alloc] initWithFrame:frame
style:UITableViewStyleGrouped];