[英]Indexed UITableView without section header
我想實現一個沒有節段頭的分組索引的UITableView。
我正在使用sectionIndexTitlesForTableView:(UITableView *)tableView
返回我的標題。
我還實現了tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
並返回nil
以及tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
並返回0.0f
。
兩者都不會刪除節標題。 不同部分之間仍然存在空間。
我有同樣的問題,找不到解決方案。 最后,我只好子類UIViewController
(不UITableViewController
),並使用一個UITableView
透明背景和樣式設置為UITableViewStylePlain
。 然后,我為第一行和最后一行(帶有圓角)以及一些左右透明邊創建了自定義單元格。 如果您願意,我可以為您提供更多詳細信息,但是由於它不能直接回答您的問題,因此,我現在僅分享此鏈接 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.