Created
November 21, 2016 10:30
-
-
Save ManWithBear/8bc4bf59bd543367edb83b669c255049 to your computer and use it in GitHub Desktop.
Fix problem with wrong tableHeaderView height
This file contains hidden or 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
- (void)viewDidLayoutSubviews { | |
[super viewDidLayoutSubviews]; | |
// Give system time to properly recalculate tableHeaderView height and update it | |
// Otherwise wrong height appear on iOS 10 | |
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ | |
self.tableView.tableHeaderView = self.tableView.tableHeaderView; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment