tableView中自定header视图的重用问题

   在UItableView中使用代理方发

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section时,使用UIView自定义的header,发现不能重用,后来发现要想重用必须使用 UITableViewHeaderFooterView自定义header, UITableViewHeaderFooterView类似继承与UIView的一个类,有initWithReuseIdentifier方法,类似于UITableViewCell的重用标示符方法,而UIView没有此方法,而且在设置背景颜色是要使用contentView.backgroundColor,不能直接使用backgroundColor
原文地址:https://www.cnblogs.com/shanyimin/p/4116492.html