search

Home  >  Q&A  >  body text

objective-c - UITableView issue for IOS.

When setting up a UITableView, my return rows cannot be executed no matter how many they are. Even when running, they are all the same.. There are only a few rows.

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    return 20;
}

return 20 or 50. Or more or less is the same.. The results displayed on the simulator are the same, only a few lines, and when I operate the Cell later, it is also displayed on the tableView Not coming out.

巴扎黑巴扎黑2818 days ago635

reply all(5)I'll reply

  • 黄舟

    黄舟2017-05-16 13:21:01

    Return cellheight’s proxy method, return cell’s proxy method, how to write it

    reply
    0
  • PHP中文网

    PHP中文网2017-05-16 13:21:01

    Can you post other proxy methods?

    reply
    0
  • 某草草

    某草草2017-05-16 13:21:01

    First of all, check whether the delegate and DataSource of UITableView are set up. If so, can you post the code of the proxy method

    reply
    0
  • ringa_lee

    ringa_lee2017-05-16 13:21:01

    One situation is that if you set the cell directly visually, the code will not change when you write it. The other situation is that you can see if your protocol is set. In your cellforRow .cell is a registered cell.

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-16 13:21:01

    Check whether the height of your tabelview is set enough. Due to the cell recycling strategy, the number of cells displayed in iOStabelview is limited to the height of the tabelview.

    reply
    0
  • Cancelreply