zoukankan      html  css  js  c++  java
  • 动态设置uitableview高度,参考

    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath

    {

    //    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];

    //    return cell.contentView.frame.size.height;

        UITableViewCell *cell = [self tableView:tableView cellForRowAtIndexPath:indexPath];

        return cell.frame.size.height;

    }

    不能直接用UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; 

  • 相关阅读:
    21.扩展
    20.嵌套类型
    19.类型转换
    18.错误处理
    17.可选链
    16.ARC
    15.析构函数
    14.构造函数
    13.继承
    12.下标
  • 原文地址:https://www.cnblogs.com/isItOk/p/4875330.html
Copyright © 2011-2022 走看看