UITableViewController accessing static cells programmatically issue

后端 未结 6 1452
孤独总比滥情好
孤独总比滥情好 2021-01-05 23:41

Say I have a table with 10 static cells in it, is there a way to select a certain cell programmatically?

I\'ve tried this

UITableViewCell *cell = [se         


        
6条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-06 00:16

    Use table view delegate method

    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
    {
         NSInteger height;  
         if(0 == indexPath.row)  
           {
              height = 44;
           }
         else
          {  
            height = 50;
          }
       return height;
    }
    

提交回复
热议问题