首页 > 移动平台 > 详细

ios8 UITableView section不显示

时间:2014-10-20 21:01:30      阅读:161      评论:0      收藏:0      [点我收藏+]

ios8 如果UITableView只设置viewForHeaderInSection,则可能section不能显示,iOS7及以下版本显示正常。

解决方案:

设置heightForHeaderInSection。

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
    return 22;//自定义高度
}

 

另外,

如果代码中设置了titleForHeaderInSection,则不需要上面的设置也可以正常显示。

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section; 

 

ios8 UITableView section不显示

原文:http://www.cnblogs.com/geweb/p/tableViewsection.html

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