How can I get the height of a specific row in my UITableView

前端 未结 4 1639
难免孤独
难免孤独 2021-02-04 00:29

In my UITableView i\'ve set different heights for different rows using the delegate method: tableView:heightForRowAtIndexPath:

Now given a

4条回答
  •  情深已故
    2021-02-04 00:44

    Simplly Use

    tableView:heightForRowAtIndexPath

    method

    int row = 1;
    
    int section = 0;
    
    NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:section];
    
    float height = [self tableView:tableView heightForRowAtIndexPath:indexPath];
    

    Hope this wil help for you :)

提交回复
热议问题