1

目前看来,ASTableNode两者ASTableView都缺乏节页眉/页脚视图的支持。

我不能只找到一个协议方法:

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

这什么也没显示。

并且委托/数据源设置器方法已被 AsyncDisplayKit 拦截,因此我无法使用 UIKit 的方式来执行此操作。

那么,我可以在使用 AsyncDisplayKit 时添加部分页眉/页脚视图吗?

4

1 回答 1

6

只需找出ASTableNode将调用UITableViewDelegate方法即可。

所以只需实现方法

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

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

它会像以前一样工作。

于 2017-03-29T06:54:34.617 回答