首页 > 其他 > 详细

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

时间:2014-11-23 15:37:40      阅读:353      评论:0      收藏:0      [点我收藏+]

   在UItableView中使用代理方发

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

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

原文:http://www.cnblogs.com/shanyimin/p/4116492.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!