Last active
January 9, 2019 01:28
-
-
Save geek1706/9a4eaf2b237f1a1ab7c833eebffedffd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UITableView { | |
func hideEmptyCells() { | |
tableFooterView = UIView() | |
} | |
/// Layout an auto layout header view | |
func setAndLayoutTableHeaderView(_ header: UIView) { | |
header.setNeedsLayout() | |
header.layoutIfNeeded() | |
header.frame.size = header.systemLayoutSizeFitting(UILayoutFittingCompressedSize) | |
tableHeaderView = header | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment