how to hide empty rows in a UITableView and change the height of the Uitableview based on non-empty rows

前端 未结 11 1988
离开以前
离开以前 2021-01-30 05:06

I have couple of problems with my UITableView.

  1. When I add a UITableview on my page, by default it brings up some fixed number of rows,

11条回答
  •  半阙折子戏
    2021-01-30 05:51

    This can also be done through Interface Builder. Simply add a 1 pixel tall UIView as a footer to the UITableView. It's essentially the same as most of the answers here, but it keeps some UI specifics in the view instead of in the view controller.

    enter image description here

提交回复
热议问题