2011-12-21 51 views
3

表格單元格中,我試圖用有沒有重新加載節標題視圖從tableview中

[_tableView reloadSections:<#(NSIndexSet *)#> withRowAnimation:<#(UITableViewRowAnimation)#>]; 

單獨一個可能的方式,但它會重新加載表格單元屬於哪個我不希望部分。

我還試圖通過

- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section 

以提供節頭視圖和我保持的參考。它也沒有工作。

回答

1

Did you mean viewForHeaderInSection or is in the code in your code?如果您有對節標題視圖的引用,並且修改了視圖,則應該在表中進行更新。如果您更改視圖無法識別爲需要重繪,則可能需要致電[headerView setNeedsDisplay]

+0

是的,對於錯字感到抱歉。我再次證實它,它的工作原理。也許我真的忘了'setNeedsDisplay'。非常感謝你! – 2011-12-21 07:28:48