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

解决方案:

设置heightForHeaderInSection。

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

另外,

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

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

ios8 UITableView section不显示的更多相关文章

  1. iOS8中 UITableView section 分区头部视图不显示

    最近自己使用了UITableView写了一个通讯录,但是在编写过程还算顺利,但是后来测试的时候,发现在iOS8中TableView的分区头不能正常显示,使用 - (NSString *)tableVi ...

  2. UITableView section 圆角 阴影

      在UITableView实现图片上面的效果,百度一下看了别人的实现方案有下面2种: 1.UITableView section里面嵌套UITableView然后在上面实现圆角和阴影,  弊端代码超 ...

  3. iOS8自定义推送显示按钮及推送优化

    http://www.jianshu.com/p/803bfaae989e iOS8自定义推送显示按钮及推送优化 字数1435 阅读473 评论0 喜欢2 导语 在iOS8中,推送消息不再只是简单地点 ...

  4. UICollectionView 数据库元素分组 多种section分开显示

    第一遍 复杂方法 : 数据库查询一个表中userID 然后进行分类 中间去重 获得ID个数  放到section 中  显示 #pragma mark -  查询不同的ID 各数  - (void)c ...

  5. UITableView加载显示更多内容

    #import <UIKit/UIKit.h> @interface ViewController : UIViewController @end #import "ViewCo ...

  6. UITableView section header 不固定

    iOS系统自带的UITableView,当数据分为多个section的时候,在UITableView滑动的过程中,默认section header是固定在顶部的,滑动到下一个section的时候,下一 ...

  7. [iOS基础控件 - 6.1] 汽车品牌列表 UITableView多项显示

    A.实现思路 1.拖入UITableView 2.拖曳.连线UITableView控件 3.Controller遵守UITalbeViewDataSource协议 4.设置UITableView的da ...

  8. 设置UITableView section间距

    - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { return 0 ...

  9. iOS8 UITableView 分割条设置separator intent = 0 不起作用

    转自:http://blog.csdn.net/ljb_wh/article/details/40788333 ios7的时候在storyboard 设置 TableView的separator in ...

随机推荐

  1. VBA文本型数字变成数值

    sub test()with activesheet  .usedrange.numberformatlocal=""  .usedrange=.usedrange.valueen ...

  2. Flex 学习

    Flex案例一: <html> <head> <meta http-equiv="Content-Type" content="text/h ...

  3. sqoop操作之HDFS导出到ORACLE

    注意:在导出前需要先创建待导出的表结构.如果导出的表在数据库中不存在则会报错:如果重复导出多次,表中的数据会重复: ; ; 导出表的所有字段 sqoop export --connect jdbc:o ...

  4. Oracle导出DMP文件的两种方法

    本文转载自:http://www.cnblogs.com/o-andy-o/archive/2013/06/05/3118611.html   导出: 方法一:利用PL/SQL Developer工具 ...

  5. 听听八年阿里架构师怎样讲述Dubbo和Spring Cloud微服务架构

    转自:https://baijiahao.baidu.com/s?id=1600174787011483381&wfr=spider&for=pc 微服务架构是互联网很热门的话题,是互 ...

  6. vue组件系统

    1. 全局组件的注册 <body>    <div id="app">        <!--<global-component>< ...

  7. Spring AOP课程实战

  8. python基础补充内容

    知识内容: 1.三元运算表达式 2.python代码编写规范 3.模块导入与使用 4.python文件名 5.python脚本的"__name__"属性 6.python之禅 一. ...

  9. mavenProfile文件配置和简单入门

    1什么是MavenProfile 在我们平常的java开发中,会经常使用到很多配制文件(xxx.properties,xxx.xml),而当我们在本地开发(dev),测试环境测试(test),线上生产 ...

  10. django 不同版本 url 及path区别