1

It seems that currently ASTableNode and ASTableView both lack the support of section header/footer view.

I cannot only find a protocol method:

- (nullable NSString *)tableNode:(ASTableNode *)tableNode titleForHeaderInSection:(NSInteger)section

which shows nothing.

And the delegate/dataSource setter methods have been intercepted by AsyncDisplayKit, so that I cannot use the UIKit's way to do it.

So can I add section header/footer view when I'm using AsyncDisplayKit?

xi.lin
  • 3,326
  • 2
  • 31
  • 57

1 Answers1

6

Just find out that ASTableNode will call the UITableViewDelegate methods.

So just implement the methods

- (nullable UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section;

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section;

And it will work just like before.

xi.lin
  • 3,326
  • 2
  • 31
  • 57