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

前端 未结 9 1089
庸人自扰
庸人自扰 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:41

    The code that you shared looks fine to me. Are you pushing view controller with this tableview on navigation controller stack ? I have seen people do that before. Default height of cell is 44px and height of navigation bar is 44px as well. So, if you push this on navigation controller stack you scroll view snaps back like you have described. If that is the case reduce height of TableView by 44 px ( in Interface builder or Programatically if you drew this programatically) and it should fix it.

提交回复
热议问题