gpt4 book ai didi

ios - 为什么 - (void)tableView :(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section not called

转载 作者:可可西里 更新时间:2023-11-01 04:23:30 25 4
gpt4 key购买 nike

- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section
{
[view vChangeBackgroundToCyan];
}

之后

[self.delegateForTableController.tvDelegated insertSections:[NSIndexSet indexSetWithIndex:ip.section] withRowAnimation:UITableViewRowAnimationRight];

如何称呼他们?

最佳答案

tableView:viewForHeaderInSection: 返回的类需要是 UITableViewHeaderFooterView 的子类才能调用 tableView:willDisplayHeaderView:forSection: 方法。

如果返回的 View 是其他类型,则不会调用 tableView:willDisplayHeaderView:forSection: 方法。

关于ios - 为什么 - (void)tableView :(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section not called,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22266241/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com