Welcome, Guest
Username Password: Remember me

Sectioning a TableView
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: Sectioning a TableView

Sectioning a TableView 1 year, 8 months ago #1

Do I have to manually create each section?

SCArrayOfObjectsSection *shoesSection = [SCArrayOfObjectsSection sectionWithHeaderTitle:@"Shoes Section" withItems:[mainDelegate shoes]
withClassDefinition:shoeClassDef];



My sections are dynamically generated so I am having trouble figuring this out.
  • baberuth22
  • OFFLINE
  • Expert Boarder
  • Posts: 84
  • Karma: 2
Last Edit: 1 year, 8 months ago by baberuth22.

Re: Sectioning a TableView 1 year, 8 months ago #2

Hi Bryan:

I am having problems understanding your question, would you please elaborate or post more code? Thanks!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: Sectioning a TableView 1 year, 8 months ago #3

I would like to display my data in different sections based upon an attribute of my objects.

For example, suppose I have socks and I want my sections to be grouped by color.

Would I have to create a section for each color? like this:

 
SCArrayOfObjectsSection *shoesSection = [SCArrayOfObjectsSection sectionWithHeaderTitle:@"Shoes Section" withItems:[[mainDelegate socks] ofColor:red]
withClassDefinition:sockClassDef];
 
 
SCArrayOfObjectsSection *shoesSection = [SCArrayOfObjectsSection sectionWithHeaderTitle:@"Shoes Section" withItems:[[mainDelegate socks] ofColor:blue]
withClassDefinition:sockClassDef];
 
...
...
 
 
 
  • baberuth22
  • OFFLINE
  • Expert Boarder
  • Posts: 84
  • Karma: 2

Re: Sectioning a TableView 1 year, 8 months ago #4

Hi Bryan,

This have been requested before and we're working now on figuring out a way where Sensible TableView will automatically generate the sections for you (expected to have something in a week or so). For now, the method you mentioned above is the way to go.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72
Last Edit: 1 year, 8 months ago by tarekskr.

Re: Sectioning a TableView 1 year, 7 months ago #5

I would be interested in sectioning tables as well with Core Data. I am doing it manually at the moment but tieing it in with Sensible Tables and have it refresh automatically after new data is added would be great.
  • monsta
  • OFFLINE
  • Expert Boarder
  • Posts: 130
  • Karma: 2

Re: Sectioning a TableView 1 year, 7 months ago #6

We're working on wrapping this up for our new release, due in about 10 days from now We'll keep you posted.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72
  • Page:
  • 1
  • 2
Time to create page: 1.80 seconds