how do I expand cell in tableview dynamically?

后端 未结 3 1421
醉话见心
醉话见心 2021-01-25 22:28

I have only one cell with a button in a tableview. The cell height is defined in

tableView:tableView:heightForRowAtIndexPa         


        
3条回答
  •  醉梦人生
    2021-01-25 22:48

    Here is the documentation for UITableView Delegate. You need to set a delegate and set the function is - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath. Remember the return value is CGFloat, so return 80.0 instead of 80. Hope this helps.. Read more about other delegate functions in the documentation...

提交回复
热议问题