Skip to content

Instantly share code, notes, and snippets.

@mrpcalcantara
Created December 11, 2019 13:43
Show Gist options
  • Save mrpcalcantara/adadac6866b0c6cd1498dcbedf7a1bf6 to your computer and use it in GitHub Desktop.
Save mrpcalcantara/adadac6866b0c6cd1498dcbedf7a1bf6 to your computer and use it in GitHub Desktop.
// Taken from https://github.com/kharrison/CodeExamples/blob/master/TableHeader/TableHeaderSwift/TableHeader/ListTableViewController.swift
// Calculate the minimum height of the header view that allows
// the text label to fit its preferred width.
let size = view.systemLayoutSizeFitting(UIView.layoutFittingCompressedSize)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment