Welcome, Guest
Username Password: Remember me

SCSelectionSection with 'add' capability?
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: SCSelectionSection with 'add' capability?

SCSelectionSection with 'add' capability? 1 year, 7 months ago #1

Hi, I have a question about SCSelectionSection.

My application has the ability to add a tag to an entry for searching. When the use selects edits the properties of an entry I'd like to give them the option to select which tags will apply to the entry.

This looks like a job for SCSelectionSection, actually, I've used it to select tags prior to a search and it's fantastic.

However, when the user is editing the properties of an entry I'd also like to give them the option to ADD a new tag to the system. So what I would really like is to display a SCSelectionSection but also have an 'New Tag' button somewhere in the same view.

What's the best way to do this in STV?

Thank you again for your time and a great product.
  • oldbeamer
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Karma: 0

Re: SCSelectionSection with 'add' capability? 1 year, 7 months ago #2

Thanks Emiliano!

You can do the following:

1- Add your custom "New Tag" button normally.

2- When the button is tapped, get the new tag and add it to SCSelectionSection "items" array. Edit: Please note that you should be replacing the items array altogether for SCSelectionSection to detect that a change has happened.

3- Call [tableView reloadData] and the selection set should be updated.

Hope this helps.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72
Last Edit: 1 year, 7 months ago by tarekskr.

Re: SCSelectionSection with 'add' capability? 1 year, 7 months ago #3

That's what I was afraid of, so there's no way to marry the 'add' (and delete) functionality of SCArrayOfStringsModel to the SCSelectionSection selection functionality?
  • oldbeamer
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Karma: 0

Re: SCSelectionSection with 'add' capability? 1 year, 7 months ago #4

They're completely different beasts If you want, you can have a view where the user can add/edit/delete tags using an SCArrayOfStringsSection, and then have the selection happen in a different view based on these items.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72

Re: SCSelectionSection with 'add' capability? 1 year, 7 months ago #5

Ok, thank you very much for your help.
  • oldbeamer
  • OFFLINE
  • Junior Boarder
  • Posts: 37
  • Karma: 0
  • Page:
  • 1
Time to create page: 0.78 seconds