How to make the blue bar on the top disappear for tttableview with list datasource (program running on ios 5 beta)

那年仲夏 提交于 2020-01-23 06:28:26

问题


There is a blue bar appearing on the top of my tttableview when the program is running on ios 5 beta, it was not there if I run the program on ios 4.3. The table is configured to use a list datasource. Does anyone know what the problem could be? Is it the tableview api changed in someway for ios 5? Thanks.


回答1:


It is caused by a subtle but important change Apple made in the UITableView behavior for section headers and footers. If you implement the tableView:viewForHeaderInSection: or tableView:viewForFooterInSection: delegate methods then you MUST now also implement the tableView:heightForHeaderInSection: and tableView:heightForFooterInSection: delegate methods.

The extra blank section header you are seeing is caused by returning 'nil' from the '...viewFor...' methods but not returning 0 from the '...heightFor...' methods.




回答2:


Pull down the latest code from Three20 git repository on github. They have corrected this issue with tttableview.

See this page https://github.com/facebook/three20/issues/643



来源:https://stackoverflow.com/questions/6651367/how-to-make-the-blue-bar-on-the-top-disappear-for-tttableview-with-list-datasour

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!