Change Height of a UITableViewCell

后端 未结 5 1435
一整个雨季
一整个雨季 2021-02-13 04:36

I want to make a UITableViewCell bigger. How can I do this, I have tried adjusting its frame but nothing happens. What can I do?

5条回答
  •  清酒与你
    2021-02-13 04:56

    You can use this code for changing the height of different tableview

    -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        if(tableView == tableView1) 
        {
            return 55;
        }
        else if(tableView == tableView2)
        {
            return 75;
        }
    }
    

    This may help you.

提交回复
热议问题