From cd73193de3ac1a607c4431be6e6ba7395cef81b4 Mon Sep 17 00:00:00 2001 From: deammon Date: Fri, 15 Apr 2016 12:02:30 +0300 Subject: [PATCH] Fix fd_heightForHeaderFooterViewWithIdentifier configuration block execution. --- Classes/UITableView+FDTemplateLayoutCell.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Classes/UITableView+FDTemplateLayoutCell.m b/Classes/UITableView+FDTemplateLayoutCell.m index 64305c1..c52f33e 100644 --- a/Classes/UITableView+FDTemplateLayoutCell.m +++ b/Classes/UITableView+FDTemplateLayoutCell.m @@ -204,6 +204,10 @@ - (__kindof UITableViewHeaderFooterView *)fd_templateHeaderFooterViewForReuseIde - (CGFloat)fd_heightForHeaderFooterViewWithIdentifier:(NSString *)identifier configuration:(void (^)(id))configuration { UITableViewHeaderFooterView *templateHeaderFooterView = [self fd_templateHeaderFooterViewForReuseIdentifier:identifier]; + if (configuration != NULL){ + configuration(templateHeaderFooterView); + } + NSLayoutConstraint *widthFenceConstraint = [NSLayoutConstraint constraintWithItem:templateHeaderFooterView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:CGRectGetWidth(self.frame)]; [templateHeaderFooterView addConstraint:widthFenceConstraint]; CGFloat fittingHeight = [templateHeaderFooterView systemLayoutSizeFittingSize:UILayoutFittingCompressedSize].height;