diff --git a/Classes/UITableView+FDTemplateLayoutCell.m b/Classes/UITableView+FDTemplateLayoutCell.m index 632b32c..11a8b09 100644 --- a/Classes/UITableView+FDTemplateLayoutCell.m +++ b/Classes/UITableView+FDTemplateLayoutCell.m @@ -158,7 +158,10 @@ - (__kindof UITableViewCell *)fd_templateCellForReuseIdentifier:(NSString *)iden templateCell = [self dequeueReusableCellWithIdentifier:identifier]; NSAssert(templateCell != nil, @"Cell must be registered to table view for identifier - %@", identifier); templateCell.fd_isTemplateLayoutCell = YES; - templateCell.contentView.translatesAutoresizingMaskIntoConstraints = NO; + NSString *version = [UIDevice currentDevice].systemVersion; + if (version.doubleValue < 11.0){ + templateCell.contentView.translatesAutoresizingMaskIntoConstraints = NO; + } templateCellsByIdentifiers[identifier] = templateCell; [self fd_debugLog:[NSString stringWithFormat:@"layout cell created - %@", identifier]]; }