iOS7.0 y iOS 7.1 no respetan la altura de la vista de tabla dinámica

He utilizado la distribución automática en varias implementaciones para UITableViewCell, ya que el enfoque permite que el tamaño intrínseco defina el tamaño y que a su vez proporcionará altura para las filas de vista de tabla.

Curiosamente, pero apuntar a iOS7 y superior con Autolayout en UITableViewCell no funciona como se desea.

Para solucionar uno de los otros problemas donde las celdas de vista de tabla se comprimieron (en iOS8 y superior) agregué la siguiente verificación

if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_1 ){
    self.tblvChatList.rowHeight =  UITableViewAutomaticDimension;
    self.tblvChatList.estimatedRowHeight = 44;
}

Los únicos otros métodos de vista de tabla que he usado son

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    if ([self.arrDataSource count] > ZERO_VALUE) {
        self.tblvChatList.backgroundView = nil;
        self.tblvChatList.separatorStyle = UITableViewCellSeparatorStyleNone;
        return [self.arrDataSource count];
    }
    else {
        // Display a message when the table is empty

        if (!viewTableBackground) {

            self.viewTableBackground = [[UIView alloc] initWithFrame:self.tblvChatList.bounds];

            UIImageView* imgConChatLogo = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"IconConChatTheme"]];
            [imgConChatLogo setContentMode:UIViewContentModeCenter];
            [imgConChatLogo setTranslatesAutoresizingMaskIntoConstraints:NO];



            UILabel* lblNoListDataError = [[UILabel alloc] initWithFrame:CGRectMake(ZERO_VALUE, ZERO_VALUE,
                                                                                    (2*self.view.bounds.size.width)/3, self.view.bounds.size.height)];

            lblNoListDataError.text = NSLocalizedString(@"STR_WRITE_SOMETHING_TO_MATCH",
                                                            @"No data is currently available. Please pull down to refresh.");
            [lblNoListDataError setTranslatesAutoresizingMaskIntoConstraints:NO];
            lblNoListDataError.textColor = [UIColor lightGrayColor];
            lblNoListDataError.numberOfLines = ZERO_VALUE;
            lblNoListDataError.textAlignment = NSTextAlignmentCenter;
            lblNoListDataError.font = [Theme fontForRegularBody];
            [lblNoListDataError sizeToFit];

            [viewTableBackground addSubview:lblNoListDataError];
            [viewTableBackground addSubview:imgConChatLogo];

            [viewTableBackground addConstraint:
             [NSLayoutConstraint constraintWithItem:imgConChatLogo
                                          attribute:NSLayoutAttributeCenterX
                                          relatedBy:NSLayoutRelationEqual
                                             toItem:viewTableBackground
                                          attribute:NSLayoutAttributeCenterX
                                         multiplier:1
                                           constant:0]];

            [viewTableBackground addConstraint:
             [NSLayoutConstraint constraintWithItem:lblNoListDataError
                                          attribute:NSLayoutAttributeCenterX
                                          relatedBy:NSLayoutRelationEqual
                                             toItem:viewTableBackground
                                          attribute:NSLayoutAttributeCenterX
                                         multiplier:1
                                           constant:0]];


            [viewTableBackground addConstraint:
             [NSLayoutConstraint constraintWithItem:imgConChatLogo
                                          attribute:NSLayoutAttributeBaseline
                                          relatedBy:NSLayoutRelationEqual
                                             toItem:viewTableBackground
                                          attribute:NSLayoutAttributeCenterY
                                         multiplier:1
                                           constant:-10]];
            [viewTableBackground addConstraint:
             [NSLayoutConstraint constraintWithItem:lblNoListDataError
                                          attribute:NSLayoutAttributeTop
                                          relatedBy:NSLayoutRelationEqual
                                             toItem:viewTableBackground
                                          attribute:NSLayoutAttributeCenterY
                                         multiplier:1
                                           constant:10]];

        }

        self.tblvChatList.backgroundView  = self.viewTableBackground;
        self.tblvChatList.separatorStyle = UITableViewCellSeparatorStyleNone;
    }
    return ZERO_VALUE;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    UITableViewCell* cell  = nil;
    NSUInteger userId = [[NSUserDefaults standardUserDefaults] integerForKey:@"USER_ID"];

    ChatMessage* message = (ChatMessage*)[self.arrDataSource objectAtIndex:indexPath.row];
    if (userId  == [message messageSenderId]) {
        static NSString* reuseIdentifierReceiverCell = @"ChatReceiverCustomCell";
        cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifierReceiverCell forIndexPath:indexPath];
        [(ChatReceiverCell*)cell showMessage:message];
    }
    else {
        static NSString* reuseIdentifierSenderCell = @"ChatSenderCustomCell";
        cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifierSenderCell forIndexPath:indexPath];

        // Configure the cell...
        [(ChatSenderCell*)cell showMessage:message];

    }
    return cell;
}

Yo tampoco he usadoestimateHeightForRowAtIndexPath: oheightForRowAtIndexPath: y deje que el contenido decida la altura de tableviewRow.

Problema:

¿Por qué las celdas tableView se comprimen al ejecutarse en iOS7, iOS7.1 (simulador y dispositivos) pero se muestran perfectamente en iOS8 y superior para el mismo contenido para el mismo contenido?

Para arreglar esta compresión, si implementoestimatedHeightForRowAtIndexPath: entonces no implementandoheightForRowAtIndexPath: da como resultado un bloqueo en iOS7. ¿Hay alguna manera de permitir que la vista de tabla infiera la altura de la fila desde el sistema de distribución automática en sí (como se deriva del tamaño del contenido intrínseco de UILabel con el relleno adicional que se tiene en cuenta al agregar los márgenes requeridos)?

Las restricciones de distribución automática para UILabel dentro de la celda son las siguientes

Respuestas a la pregunta(0)

Su respuesta a la pregunta