UA-17470720-3

Jump to content


Photo
- - - - -

Sectioning a TableView


  • Please log in to reply
9 replies to this topic

#1 Bryan Saltzman

Bryan Saltzman

    Experienced Member

  • STV 2.0
  • PipPipPipPip
  • 70 posts
Reputation: 0
Neutral

Posted 09 September 2010 - 08:30 AM

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.

#2 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 11 September 2010 - 11:14 AM

Hi Bryan:

I am having problems understanding your question, would you please elaborate or post more code? Thanks!

#3 Bryan Saltzman

Bryan Saltzman

    Experienced Member

  • STV 2.0
  • PipPipPipPip
  • 70 posts
Reputation: 0
Neutral

Posted 16 September 2010 - 09:22 AM

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];

...
...




#4 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 16 September 2010 - 11:42 AM

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.

#5 Phil

Phil

    Advanced Member

  • STV 5.0 Pro
  • PipPipPipPipPip
  • 138 posts
Reputation: 7
Good

Posted 27 September 2010 - 11:27 PM

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.

#6 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 28 September 2010 - 01:06 AM

We're working on wrapping this up for our new release, due in about 10 days from now :) We'll keep you posted.

#7 Phil

Phil

    Advanced Member

  • STV 5.0 Pro
  • PipPipPipPipPip
  • 138 posts
Reputation: 7
Good

Posted 10 October 2010 - 03:02 PM

Hi,

Was just checking if there is any update on this feature to be able to section tables.

Thanks!

#8 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 10 October 2010 - 03:13 PM

This have been implemented as part of our upcoming 1.6 release. We just need 2 or 3 more days until the official release is ready :)

#9 Phil

Phil

    Advanced Member

  • STV 5.0 Pro
  • PipPipPipPipPip
  • 138 posts
Reputation: 7
Good

Posted 17 October 2010 - 10:15 PM

Hi,

Did this feature make it into v1.6 ?? Are there any examples on its usage ??

Many thanks,
Phil.

#10 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 18 October 2010 - 04:31 AM

Yes it has Phil. Please check our Core Data sample application under the "People" tab. If you go to the "People" tab and add a new person, a new section will be automatically generated based on the first character of the person's name.

Please tell me if you have any further questions regarding this.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users