CoreStore icon indicating copy to clipboard operation
CoreStore copied to clipboard

Sections In Results

Open HuXu77 opened this issue 9 years ago • 2 comments

With a fetched results controller we can execute a fetch request and get back sections and rows making it easy for a table view to have section headers and get the results for each section referenced by the row.

I can't figure out how to do that with this, what is the best approach? I was thinking it would be using GroupBy but that is a QueryClause but I don't want to specify attributes I want the actual objects just grouped by a property.

HuXu77 avatar Oct 10 '17 18:10 HuXu77

Hi, what you are looking for is the SectionBy clause. Refer to the description and sample code in the README: https://github.com/JohnEstropia/CoreStore#observe-a-list-of-objects

JohnEstropia avatar Oct 10 '17 23:10 JohnEstropia

Perfect!

HuXu77 avatar Oct 11 '17 15:10 HuXu77