ios - automatic height for -[tableView:heightForHeaderInSection:] -


tl, dr: wish set all properties of section header, including height, in storyboard. there way can that?

there's never around in cocoatouch api.

the uitableviewdelegate contains method called -[tableview:heightforheaderinsection:], must return appropriate height header in section.

the best practices know of advise separate presentation , logic. yet, uitableviewdelegate seems mix these 2 concepts: handles interaction (didselect...) , aspects of presentation (heightforheader...).

furthermore, define section headers in storyboards, therefore making both storyboard , (typically) view controller highly interdependent section headers.

is there way find out height in generic way, or make method "automatic"? used section header , return height, it's performance issue when there many section headers.

you should draw arbitrary header in tableview:heightforheader method , return height of arbitrary header dynamic header size. worked me. hope works too.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -