Created
May 28, 2015 10:08
-
-
Save EvgenyMorozov/a8977eae4b4720fa445d to your computer and use it in GitHub Desktop.
Based on SO-question: http://stackoverflow.com/questions/19005446/table-header-view-height-is-wrong-when-using-auto-layout-ib-and-font-sizes
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
CustomHeaderViewWithAutoLayout *customHeaderView = [[CustomHeaderViewWithAutoLayout alloc] init]; | |
CGFloat fittingSize = [customHeaderView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize]; | |
CGRect fittingFrame = customHeaderView.frame; | |
fittingFrame.size = fittingSize; | |
customHeaderView.frame = fittingFrame; | |
tableView.tableHeaderView = customHeaderView; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment