Prototype header view's height in UITableView being added automatically in iOS8

Originator:rchieng
Number:rdar://18190614 Date Originated:01-Sep-2014
Status:Open Resolved:
Product:iOS Product Version:iOS8 beta 5
Classification: Reproducible:
 
Summary:
If we alloc a protoypeHeaderView one to calculate the UITableView's section headerView's height in

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
if (!self.prototypeHeaderView)
        {
            self.prototypeHeaderView = [[HeaderView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.tableView.bounds), 40)];
        }

…
CGFloat height = [self.prototypeHeaderView systemLayoutSizeFittingSize:UILayoutFittingExpandedSize].height;
    
    return height;
}

a height constraint will be added automatically afterwards.

Steps to Reproduce:
Please refer to attach file. It has sample source

Expected Results:
Height constraint should not be added automatically

Actual Results:
Height constraint is added automatically

Version:
iOS8 beta 5

Notes:


Configuration:
iPhone 5s 64gb iOS8 beta 5. 

Attachments:
'Bug.zip' was successfully uploaded.

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!