簡體   English   中英

在uitableview中,tablefooter的大小沒有增加

[英]Size of tablefooter not increasing in uitableview

表頁腳的大小沒有增加,默認情況下似乎是固定的。 我們如何改變它? 我為此使用了下面提到的代碼,但是它不起作用。 有人可以幫我嗎? 提前致謝。

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

    UIView *view = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 200)] autorelease];
    view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"blue-bg.jpg"]];
    return view;

}

在您要確認UITableViewDelegate的.h文件中,可以按命令按鈕,然后單擊UITableViewDelegate,它將帶您進入協議,在該協議中可以找到可用於自定義表格視圖的所有相關方法。 是的,如何做到這一點已經得到了解答。 祝好運!! 干杯!!

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM