tableview 部分的其他标准?
Other criteria to tableview's section?
我想问我是否可以将 "criteria" 而不是 "FirstCharacter" 和 "FullString" 与 "section.criteria" 一起用于表格视图部分。
例如,我需要选取 "section.property" 的前两个字符来提取一些数据并对其进行排序。
我有 属性“12:30”,我想提取“12”以在行部分显示它,而不仅仅是选择第一个字符“1”。
我没有找到,但我希望有解决办法。
docs:
section.criteria holds the criteria for forming each section based on section.property. This value can be one of:
ViewSection.FullString (default) - sections are created based on the section.property value.
ViewSection.FirstCharacter - sections are created based on the first character of the section.property value (for example, 'A', 'B', 'C' sections, etc. for an address book)
A case insensitive comparison is used when determining section boundaries.
或许您可以向您的模型添加一个新角色(例如,'sectionRole')并将其用于对视图中的项目进行分组?
我想问我是否可以将 "criteria" 而不是 "FirstCharacter" 和 "FullString" 与 "section.criteria" 一起用于表格视图部分。
例如,我需要选取 "section.property" 的前两个字符来提取一些数据并对其进行排序。
我有 属性“12:30”,我想提取“12”以在行部分显示它,而不仅仅是选择第一个字符“1”。
我没有找到,但我希望有解决办法。
docs:
section.criteria holds the criteria for forming each section based on section.property. This value can be one of:
ViewSection.FullString (default) - sections are created based on the section.property value.
ViewSection.FirstCharacter - sections are created based on the first character of the section.property value (for example, 'A', 'B', 'C' sections, etc. for an address book)
A case insensitive comparison is used when determining section boundaries.
或许您可以向您的模型添加一个新角色(例如,'sectionRole')并将其用于对视图中的项目进行分组?