Welcome, Guest
Username Password: Remember me

custom cell with SCObjectSection
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: custom cell with SCObjectSection

custom cell with SCObjectSection 1 year, 2 months ago #1

Hi,

I'm using an SCObjectSection in my app and am trying to create a custom cell for it. I've implemented customCellForRowAtIndexPath, but it doesn't seem to get called for SCObjectSection generated cells.

Is there a way to have custom cells with SCObjectSections? Or do I have to revert back to creating all my cells myself manually?

Thanks!

Brendan
  • tapforms
  • OFFLINE
  • Expert Boarder
  • Posts: 120
  • Karma: 4
Thanks!
Brendan
www.tapforms.com

Re: custom cell with SCObjectSection 1 year, 2 months ago #2

Hi Brendan,

The customCellForRowAtIndexPath method is only required for SCArrayOfItemsSection/SCArrayOfItemsModel descendants. For an SCObjectSection (SCObjectCell, etc.), custom cells are defined as part of its object's class definition. For an example of doing that, please check the contactDef class definition in the "Custom Cells App" (in ObjectBindingViewController.m).

This architecture allows you to have custom cells for both the SCArrayOfObjectsSection itself (via customCellForRowAtIndexPath), and for each of its detail views (via the class definition as mentioned above). Again, this is all demonstrated in the sample application (and will be in a video tutorial very soon! ).

Please tell me if you need any more help.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72
Last Edit: 1 year, 2 months ago by tarekskr.

Re: custom cell with SCObjectSection 1 year, 2 months ago #3

Thanks Tarek. I'm looking into the Custom Cells App sample now.

You've seen my project. It's that same screen that I'm still working on. The one with the disappearing TextView (which is fixed now. Thanks for that). Instead of a UISegmentedControl to select between genders, they wanted photos of a male and a female with radio buttons below to tap on. So I need to build it as a custom cell.

The SCArrayOfObjectsSection, etc. implies I need a list of objects and then a details page for each object. In my situation, I don't have a list of objects. There's just one object. In other words, there's only a detail screen. No list screen.

Do I still use SCArrayOfObjectsSection, but with my single object in the array?

Thanks,

Brendan
  • tapforms
  • OFFLINE
  • Expert Boarder
  • Posts: 120
  • Karma: 4
Thanks!
Brendan
www.tapforms.com

Re: custom cell with SCObjectSection 1 year, 2 months ago #4

Hi Brendan,

You're not at all required to use an SCArrayOfObjectsSection. Just use a normal SCObjectSection, giving it your object and its class definition as you would normally do.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72

Re: custom cell with SCObjectSection 1 year, 2 months ago #5

Works very well Tarek!

As usual, you've thought of everything

Thanks!

Brendan
  • tapforms
  • OFFLINE
  • Expert Boarder
  • Posts: 120
  • Karma: 4
Thanks!
Brendan
www.tapforms.com
  • Page:
  • 1
Time to create page: 0.81 seconds