Welcome, Guest
Username Password: Remember me

Hybrid Sensible Table vs. Heterogeneous Cells?
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Hybrid Sensible Table vs. Heterogeneous Cells?

Hybrid Sensible Table vs. Heterogeneous Cells? 1 year, 8 months ago #1

Hi,

Prior to learning about the Sensible Table framework, I had started converting some of my table views to use the method that Matt Gallagher describes in his Cocoa with Love blog:

cocoawithlove.com/2008/12/heterogeneous-cells-in.html

I really like this approach to determining the next action to perform when a user taps a cell. The cell controller itself is responsible for dealing with all aspects of that. Your view controller doesn't need to handle that.

Have you ever thought of adding the ability to specify a cell controller so that you can implement cell specific behaviours in there instead of in your view controller? It saves you from having to do all that "if section = 0 and row = 2" junk in your didSelectRowAtIndexPath method to decide how to handle taps on cells.

As I started to implement a view controller that uses Sensible TableView, I started to feel like I was moving one step forward and one step backward.

Thanks!

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

Re: Hybrid Sensible Table vs. Heterogeneous Cells? 1 year, 8 months ago #2

Hi Brendan,

What you're describing is already implemented in Sensible TableView. Have you had a look at SCTableViewCellDelegate? Each cell can be assigned a delegate through its "delegate" property, then you can implement any of the SCTableViewCellDelegate methods for this cell.

This is also true for automatically generated cells. You can just set the class definition's uiElementDelegate property to your delegate, and all generated cells will have their delegate property assigned to it. For an example of this in action, please have a look at number "2" from this post: www.sensiblecocoa.com/forum/sensible-tab...-properties.html#185

Thanks a lot for your feedback, and hope this helps
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: Hybrid Sensible Table vs. Heterogeneous Cells? 1 year, 8 months ago #3

Sweet! That's awesome Tarek!

Thanks!

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

Re: Hybrid Sensible Table vs. Heterogeneous Cells? 1 year, 8 months ago #4

You're welcome Brendan
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72
  • Page:
  • 1
Time to create page: 1.45 seconds