Search code examples
iostableviewtableheader

iOS: UITableView's header show on top of first row/section


I am trying to make the first row of my UITableView to be shown on top of the table's tableHeaderView property with some offset.

enter image description here

Any idea how to do this with a table view ?


Solution

  • As pointed out by @Eiko, what I tried to do with my other answer is potentially insecure and can lead to unforseen circumstances.

    What I ended up doing eventually is creating a new separate UIView and positioning it in the appropriate place as a subview of the UITableView to mimick the behaviour of the tableView's tableViewHeader property.