Skip to content

Instantly share code, notes, and snippets.

@magneticrob
Created February 25, 2019 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magneticrob/e31cb6b9456e537ea48682bfcd93408b to your computer and use it in GitHub Desktop.
Save magneticrob/e31cb6b9456e537ea48682bfcd93408b to your computer and use it in GitHub Desktop.
Fix for ParallaxHeader grouped section headers appearing over the header, after cell recycling
public class ParallaxGroupedSectionHeaderTableView: UITableView {
override public func layoutSubviews() {
super.layoutSubviews()
layoutHeaderViews()
}
private func layoutHeaderViews() {
for index in 0 ..< numberOfSections {
guard let sectionView = headerView(forSection: index) else { continue }
self.sendSubview(toBack: sectionView)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment