0
我想顯示UITableView中與內置行爲不同的部分,圖像作爲部分頁眉和頁腳。達到這個目標的最好方法是什麼?如何更改表格部分的顯示方式?
我想顯示UITableView中與內置行爲不同的部分,圖像作爲部分頁眉和頁腳。達到這個目標的最好方法是什麼?如何更改表格部分的顯示方式?
實現這些的UITableView-委託方法:
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
你甚至可以混合使用習慣和標準的頭,如果你的tableView返回nil:viewForHeaderInSection:對的tableView將使用標準節的標題,如果你提供一個。