Welcome, Guest
Username Password: Remember me

Custom cell divider
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Custom cell divider

Custom cell divider 1 year, 4 months ago #1

I'm adding cell to a section like this:

 
 
SCTableViewSection *section = [SCTableViewSection sectionWithHeaderTitle:@"Events"];
for (Event *evt in Events) {
SCControlCell *evtDataCell = [SCControlCell cellWithText:nil withBoundObject:evt withObjectBindings:evtDataBindings withNibName:@"EventCell"];
[section addCell:evtDataCell];
 
 


This works fine but I'd like to add a custom cell divider (ie a shadowed line). I'm thinking if there is no quick solution that I can place each cell in it's own section with a custom 2 px headerView, which isn't practical. Or I can create another SCControlCell with a 2px height and the imageView and intermix them.

I'm I thinking clearly?

Gary
  • panamind
  • OFFLINE
  • Senior Boarder
  • Posts: 77
  • Karma: 4

Re: Custom cell divider 1 year, 4 months ago #2

Or I can just and the imageView to the event control cell.
  • panamind
  • OFFLINE
  • Senior Boarder
  • Posts: 77
  • Karma: 4

Re: Custom cell divider 1 year, 4 months ago #3

Hi Gary,

I think a good solution is to use a custom cell background to achieve the effect you want. All cells would then be in one section, but their background will be modified to give your custom look. You should also assign the background at runtime (in willDisplayCell), as the first and last cells will probably have a different background than the cells in the middle.

Hope this helps.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72
  • Page:
  • 1
Time to create page: 1.32 seconds