Welcome, Guest
Username Password: Remember me

ArrayOfObjects as section
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: ArrayOfObjects as section

ArrayOfObjects as section 1 year, 8 months ago #1

I have an object that has 2 text properties and 2 array of objects properties. I would like the 2 array of object properties to be sections below two text cells instead of having to push another view controller, is this possible?
  • jhalickman
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0

Re: ArrayOfObjects as section 1 year, 8 months ago #2

Sure. Just don't include these two array properties in your object class definition. Your tableViewModel should then consist of the following:

* An SCObjectSection (bound to your object)
* A couple of SCArrayOfObjectsSection (each bound to its respective array)

Hope this helps
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72

Re: ArrayOfObjects as section 1 year, 8 months ago #3

That makes sense but then how would you add an object to one of those SCArrayOfObjectsSection.

Also how would you modify the CoreData example to do what you had said?

Thanks
  • jhalickman
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0

Re: ArrayOfObjects as section 1 year, 8 months ago #4

To add a new object, just simply provide an extra UIBarButtonItem control in your user interface, then wire it up to the SCArrayOfObjectsSection using the addButtonItem property.

I understand that you may already have another add button on your navigation bar for adding items in another section, and it might be a problem to find somewhere in the UI to add an extra button. That's why, in our next release, we're planning to add a new feature that automatically provides an extra cell in the section that adds new items when tapped. The new release is due in roughly 10 days from now. If this is urgent, we can send you a beta in the next few days.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72
  • Page:
  • 1
Time to create page: 1.30 seconds