My UITableView won't scroll down through the end of the data! Why?

前端 未结 9 1110
庸人自扰
庸人自扰 2021-01-01 19:07

Ok I don\'t know why this isn\'t working, but I have hooked up a tableView, with 19 items of text I\'d like to set to each cell.

The cells populate just fine, but wh

9条回答
  •  星月不相逢
    2021-01-01 19:45

    I had the same problem.

    Check the number of the row that you can't see.

    After in your viewDidLoad, add this method:

    myTableView.contentInset = UIEdgeInsets(top: 0,left: 0,bottom: yourCellHeight * rowHeight,right: 0)
    

    I hope I have been helpful

提交回复
热议问题