【问题标题】:Size of tablefooter not increasing in uitableviewuitableview中tablefooter的大小没有增加
【发布时间】:2012-09-15 14:25:07
【问题描述】:

table footer 的大小没有增加,好像默认是固定的。我们怎样才能改变它? 我正在为此使用下面提到的代码,但它不起作用。任何人都可以帮助我吗?提前致谢。

- (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;

}

【问题讨论】:

    标签: iphone uitableview footer


    【解决方案1】:

    在您确认 UITableViewDelegate 的 .h 文件中,您可以按下命令按钮,然后单击 UITableViewDelegate,它将带您进入协议,您可以在其中找到可用于自定义表格的所有相关方法看法。 是的,如何做到这一点的方式已经得到解答。祝你好运!!干杯!!

    【讨论】:

      【解决方案2】:
      -(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
      {
          return 50;
      }
      

      【讨论】:

      • 谢谢,这意味着我必须同时使用这两种方法,但我希望页脚的颜色清晰,以便可以看到 tableview 背景颜色。
      • 我知道,它不起作用。实际上我已经定义了我的 tableview 框架(10、20、300、460),并将图像设置为 classview 并将相同的图像设置为 tableview,使用了 clearcolor 但不起作用。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-01-20
      • 2019-07-02
      • 2022-01-22
      • 2022-08-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多