0
任何想法,爲什麼我不能減少/刪除分組UITableView中的單元格之間的空間(每節一個單元格)。我在控制器中包含以下內容:減少UITableView中單元格之間的空間 - 爲什麼這段代碼不會執行此操作?
- (CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
return 0.0;
}
- (CGFloat) tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return 0.0;
}
即使使用此代碼,單元格之間仍然存在空格。在單元格周圍放置一個邊框,並且這些空格不是來自單元格本身。
[減小的UITableView的部分之間的空間]的可能重複(http://stackoverflow.com/questions/2817308/reducing-the-space-between-sections-of-the-uitableview) – PengOne
特別是,神奇的解決方案是[這裏](http://stackoverflow.com/questions/2817308/reduce-the-space-between-sections-of-the-uitableview/2817696#2817696) – PengOne
謝謝 - 「魔法解決方案」鏈接 - 這工作 - 你知道爲什麼需要顯式分配頁眉/頁腳視圖像在「viewForHeaderInSection」中獲取樂於工作? – Greg