Why do I have an excessive amount of space in a UITableView section header?

感情迁移 提交于 2019-12-11 19:41:05

问题


I have used a UITableView control to show a list of customers that the user can select from. I've divided this into a number of sections, because the customers they need to select will vary from day to day — so the sections are used to divide between the days.

For some reason, there's an excessive amount of whitespace being included in the section header. I don't recall this being the case with iOS 5 (which this application was originally developed with).

Can anyone nudge me in the right direction?

FWIW, I'm not suppling a heightForHeaderInSection: method, so it's not that trivial. In the titleForHeaderInSection: method I'm returning a simple NSString* which represents the date.


回答1:


I used the link to question 18388429 provided by @Larme, and read through the suggestions there.

The simple fix for me was to turn off 'Adjust Scroll View Insets' for the view. That gave me the result I was after.



来源:https://stackoverflow.com/questions/20799414/why-do-i-have-an-excessive-amount-of-space-in-a-uitableview-section-header

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