美文网首页
静态UITableViewCell自适应高度

静态UITableViewCell自适应高度

作者: 清风_____ | 来源:发表于2019-04-14 15:16 被阅读0次

静态UITableViewCell自适应高度

self.tableView.estimatedRowHeight = UITableViewAutomaticDimension;

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

    if(indexPath.row==3)  {

        //在需要自适应高度的cell处 设置

        return UITableViewAutomaticDimension;

    }

}

相关文章

网友评论

      本文标题:静态UITableViewCell自适应高度

      本文链接:https://www.haomeiwen.com/subject/mjfswqtx.html