Why is willDisplayHeaderView not being called in TableViewController?
- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(nonnull UIView *)view forSection:(NSInteger)section
{
//
}
Edit:
And heightForHeaderInSection
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
//
}
Deprecation?
XCODE Version 9.0 beta 5 (9M202q)
Thanks Krunal! Your comment fixed it for iOS 11 (earlier iOS versions didn't have any problems)
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
return myView;
}
Just in case there is someone still having this issue, please ensure you set your tableview delegate and you implemented the UITableViewDelegate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With