Comparando NSNumber para 0 não está funcionando?

Eu tenho um analisador JSON no meu aplicativo e carrego o valor em uma variável detailDataSourceDict. Quando eu tento obter o valor de ValueKey da matriz e tentar compará-lo com 0, ele nunca funciona ...

Aqui está meu código:

if (indexPath.row == 1) {
    NSNumber *rating = [detailDataSourceDict valueForKey:@"rating"];
    NSLog(@"Rating:  %@",rating);
    if (rating == 0) {
        cell.detailTextLabel.text = @"This sheet has not yet been rated.";
    }
    else {
        cell.detailTextLabel.text = [NSString stringWithFormat:@"This sheet has a %@ star rating.",rating];
    }
    cell.textLabel.text = @"Rating";


}

No meu feed JSON, vejo que "rating": "0", mas quando a classificação é 0, mostra "Esta planilha tem uma classificação de 0 estrelas", em vez de "Esta planilha ainda não foi avaliada".

Alguma sugestão? Obrigado.

questionAnswers(4)

yourAnswerToTheQuestion