Remove empty space before cells in UITableView

后端 未结 30 1804
生来不讨喜
生来不讨喜 2020-11-30 16:39

I am currently trying to put a UITableView in a different location rather than at the top of my view controller. With this said, it is trying to add the header

30条回答
  •  臣服心动
    2020-11-30 17:31

    As long as UITableView is not the first subview of the view controller, the empty space will not appear.

    Solution: Add a hidden/clear view object (views, labels, button, etc.) as the first subview of the view controller (at the same level as the UITableView but before it).

提交回复
热议问题