Changing height of individual cell UITableView

前端 未结 3 1399
孤独总比滥情好
孤独总比滥情好 2020-12-16 14:07

I would like something like the following:

func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

             


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 14:42

    func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat{
       if indexPath.section == 5
       {
           if indexPath.row == 3
           {
               return 150.0
           }
       }
    
       return 200.0
    }
    

提交回复
热议问题