Welcome, Guest
Username Password: Remember me

custom section header
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: custom section header

custom section header 1 year, 7 months ago #1

Hi there,
I have a custom section header view that I apply to the SCTableViewSection. It does display, but it overlaps with the actual section because the header height is larger than what the <whatever_sc_class_does_the_actual_layout> seems to expect.

I do the layout in the layoutSubviews method of my custom header view.

I see that I can set the SCTableViewSection.headerHeight property, which works. But where is the best place to do that? Using a custom SCTableViewCell I do the same thing: layout in layoutSubviews and apply the height in the delegate method willConfigureCell. Is there a similar thing for the section header?.
Best regards,
Thorsten.
  • wolpers
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0

Re: custom section header 1 year, 7 months ago #2

Hi Thorsten,

Our upcoming 1.6 release detects the header (and footer) custom view height and automatically adjusts the header height to fit that. I'll send you now our latest RC version (the actual release is due in a few days). Please tell me if the RC version solves your issues, thanks!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72

Re: custom section header 1 year, 7 months ago #3

Thanks Tarekskr,
I received your update and it does indeed work. However, I have to calculate my view's frame in advance. Since my header data as well as the table's parent's view bounds are of fixed size, this is not much of a problem im my case here.
  • wolpers
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0

Re: custom section header 1 year, 7 months ago #4

You're welcome Thorsten. STV should be doing this calculation for you automatically though...are you able send me your header view code? Thanks a lot!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2404
  • Karma: 72
  • Page:
  • 1
Time to create page: 1.41 seconds