UITableView does not assert that a delegate implementing viewForHeaderInSection also implements heightForHeaderInSection

Originator:chilvman
Number:rdar://18468018 Date Originated:26/09/2014
Status:Open Resolved:
Product:iOS SDK Product Version:8
Classification:Enhancement Reproducible:Always
 
Summary:
Given an object that implements UITableViewDelegate method:
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section

And the same object does NOT implement
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section

Then you will get unexpected behaviour. The UITableView should assert that these two methods are required to be implemented as a pair (As per documentation)

Steps to Reproduce:
As above

Expected Results:
The UITableView should assert that a delegate implementing viewForHeaderInSection also implements heightForHeaderInSection 


Actual Results:
When UITableView’s style is UITableViewStyleGrouped viewForHeaderInSection is not called for section 0, and other unexpected behaviour.

Version:
All versions up to Xcode 6.0.1 (6A317)

Notes:


Configuration:
All versions

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!