How to remove header and footer space from a UITableView?

前端 未结 9 1915
长情又很酷
长情又很酷 2021-02-02 11:02

I have a UITableView in the grouped style, and only one section. However there is some blank space above and below the table view that is shown when the user scrolls too far. Ho

9条回答
  •  独厮守ぢ
    2021-02-02 11:59

    Use the bounces property of UIScrollView:

    [yourTableView setBounces:NO];

    This will remove what seems to be an extra padding at the top and bottom of your UITableView. Actually, it will just disable the tableview's scrollview to scroll past the edge of the content.

提交回复
热议问题