2015-10-15 45 views
-1

在下圖中,您可以看到我的headview未填滿所有可用空間。自定義headview不填滿整個屏幕

Custom headview

我該如何解決這個問題?

+1

我編輯了你的文章,以便正確插入圖像,以便更容易理解。你能提供你的代碼樣本,以便我們可以幫助你嗎?請勿複製粘貼您的所有應用程序,請僅提供相關部分。 –

回答

0

它不是頁眉的頁眉顯示。添加這些行可以解決您的問題。

-(CGFloat)tableView:(UITableView*)tableView heightForFooterInSection: (NSInteger)section 
{ 
    return 1.0; 
} 

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