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
Post a Comment