The class returned by tableView: viewForHeaderInSection: must be a subclass of UITableViewHeaderFooterView for tableView: willDisplayHeaderView: forSection: method to call.
If the returned view is of any other type, the tableView: willDisplayHeaderView: forSection: method will not be called.
source
share