2013-10-01 70 views
2

我也有類似的屏幕: enter image description here的UITableView - 刪除分隔符爲「無效」行

我想刪除低於去年「激活」細胞分離機中的tableView(在這種情況下,一切以下「Kompozytorzy」我哪有。消除這種隔膜?

我嘗試自定義分隔在cellForRow:AtIndexPath:,但每次我改變這種影響整體的tableView。

回答

5

這對於只有幾行的普通樣式表視圖正常的行爲。一個簡單的解決方法是提供一個空表頁腳:

self.tableView.tableFooterView = [[UIView alloc] init]; 
1

這是UITableView中的默認行爲,它用空行填充屏幕。

你可以做的是設置一個空的頁腳到表:

- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section 
{   
    return [[UIView alloc] init]; 
} 

或者:

[self.myTableView setTableFooterView:[[UIView alloc] init]];