Quantcast
Viewing latest article 7
Browse Latest Browse All 20

Answer by Thomas Kekeisen for Change Default Scrolling Behavior of UITableView Section Header

I was not happy with the solutions described here so far, so I tried to combine them. The result is the following code, inspired by @awulf and @cescofry. It works for me because I have no real table view header. If you already have a table view header, you may have to adjust the height.

// Set the edge insetself.tableView.contentInset = UIEdgeInsetsMake(-23.0f, 0, 0, 0);// Add a transparent UIView with the height of the section header (ARC enabled)[self.tableView setTableHeaderView:[[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 100.0f, 23.0f)]];

Viewing latest article 7
Browse Latest Browse All 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>