[英]Using a section footer view to add a row to the section where the footer view is?
[英]How to add section header/footer view when using AsyncDisplayKit?
似乎當前ASTableNode
和ASTableView
都缺少節頁眉/頁腳視圖的支持。
我不僅找到一種協議方法:
- (nullable NSString *)tableNode:(ASTableNode *)tableNode titleForHeaderInSection:(NSInteger)section
什么也沒顯示。
而且委托/數據源設置方法已被AsyncDisplayKit攔截,因此我無法使用UIKit的方法來實現。
那么在使用AsyncDisplayKit時可以添加節的頁眉/頁腳視圖嗎?
只需發現ASTableNode
將調用UITableViewDelegate
方法即可。
所以只需實施方法
- (nullable UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section;
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section;
它會像以前一樣工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.