ios8 UITableView section不显示
生活随笔
收集整理的這篇文章主要介紹了
ios8 UITableView section不显示
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
ios8 如果UITableView只設(shè)置viewForHeaderInSection,則可能section不能顯示,iOS7及以下版本顯示正常。
解決方案:
設(shè)置heightForHeaderInSection。
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {return 22;//自定義高度 }?
另外,
如果代碼中設(shè)置了titleForHeaderInSection,則不需要上面的設(shè)置也可以正常顯示。
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section;?
轉(zhuǎn)載于:https://www.cnblogs.com/geweb/p/tableViewsection.html
總結(jié)
以上是生活随笔為你收集整理的ios8 UITableView section不显示的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 《白发魔女传》里面的一首诗
- 下一篇: c++学习笔记(3)