Welcome, Guest
Username Password: Remember me

How to Respond to Cell Remove Button
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: How to Respond to Cell Remove Button

How to Respond to Cell Remove Button 1 year, 3 months ago #1

Hi everyone.

I need to be able to respond to a cell having its "Delete"/"Remove" button pressed, when it is not part of a SCArrayOfObjectsSection. As it is, tableViewModel:willRemoveRowAtIndexPath: doesn't get called. Is there any way to catch that?

Thanks!
  • amilham
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Karma: 4

Re: How to Respond to Cell Remove Button 1 year, 3 months ago #2

Hi Andrew,

I apologize for the delayed response as I was in the midst of the crisis in Egypt.

Would you please tell me what type of cell are you using? Even though I am not fully aware of your use-case yet, but I bet that using an SCArrayOfStringsSection will save you a lot of time
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: How to Respond to Cell Remove Button 1 year, 3 months ago #3

Hi,
Something like SCArrayOfStringsSection could work, but I need the cells to be SCControlCells with custom layouts. I also need the option to have the first cell in the section not be part of the array (though I could fudge that using section headers or a separate section I suppose).
Thanks!
  • amilham
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Karma: 4

Re: How to Respond to Cell Remove Button 1 year, 3 months ago #4

Hi Andrew,

SCArrayOfStringsSection supports any of your own custom cells (as of STV 2.0 beta). Please check out the "Custom Cells App" custom application for an example of this (the sample application uses SCArrayOfObjectsSection, but both classes descend from SCArrayOfItemsSection, so it should be fairly the same).

As for the 1st cell, I think your suggestion of placing it in a separate section is the best.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72
  • Page:
  • 1
Time to create page: 1.42 seconds